how to add two numbers in jav code example
Example 1: adding numbers in Javscript
return a+b;
Example 2: to add 2 numbers using function in javascript
// Prints the sum of 2 float numbers
function addition(number_1, number_2)
{
int sum = number_1 + number_2
document.write(sum)
}
var number_1 = parseFloat(prompt("First Number"));
var number_2 = parseFloat(prompt("Second Number"));
addition(number_1, number_2);