Hello every1,
I want to take two integer value from the user and display the result(sum) as output..
I am using the following JS code :
function message_comm()
{
var num1=prompt("Enter the 1st number");
var num2=prompt("Enter the 2nd number");
alert('The sum :'+num1+num2);
}
The output I am currently obtaining is a concat-string of the two input values
Ex:
Prompt for num1 ,I enter value 5
Prompt for num2 ,I enter value 5
The result obtained(at current) is 55...:(
I want the answer to be displayed as 10
..
Thanking every1 in advance
Thank You