Addition of two numbers in javascript
Here you will learn example program of addition of two numbers in javascript language.
Addition is the mathematical operation of add joining the values of two given variables.
for example:
a = 5
b = 10
sum = a + b // 10
Program: Addition of two numbers in javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <html> <head> <script language="javascript"> var a,b,c,sum; a=10; b=15; c=a+b; alert('Sum : ',+ c); document.write(Sum : +c); </script> </head> <body> </body> </html> |
Output
Sum : 25
Check out our other JavaScript examples