+ 1

How do you add two numbers in java script?

java script

25th Apr 2018, 4:30 PM
Mashmalowwwz
Mashmalowwwz - avatar
5 odpowiedzi
+ 4
This is one way: console.log(5+6);
25th Apr 2018, 4:43 PM
John Wells
John Wells - avatar
+ 4
sololearn has already the answer ;D https://www.sololearn.com/learn/JavaScript/1130/
25th Apr 2018, 6:34 PM
Stefanoo
Stefanoo - avatar
+ 2
thank you it really help
25th Apr 2018, 4:58 PM
Mashmalowwwz
Mashmalowwwz - avatar
+ 2
If you have 1 and 7 (just an example) you can add them by just simply doing 1+7. If you want to display it use either: console.log(1+7) or document.write(1+7). Was this helpful?😃
25th Apr 2018, 5:56 PM
Paul Grasser
Paul Grasser - avatar
0
a = 5 + 3; alert(a); //the alert is just to show the result //you can also add variables if they are numbers b = 3; c = 5; a = b + c; alert(a);
25th Apr 2018, 4:58 PM
Dominique Abou Samah
Dominique Abou Samah - avatar