Answer the question
In order to leave comments, you need to log in
How to add two numbers in JavaScript?
Please tell me, I have and
How can I put them together? var a = 10;
var b = 15;
Answer the question
In order to leave comments, you need to log in
var c = Number(a)+Number(c);
alert(c);
ps Comrades, newbies, before asking questions, google in Google.
Also try to deploy apache and php, then just send an ajax request to the file, which, using this library https://github.com/Herzult/SimplePHPEasyPlus , will add 2 numbers and return them to you in json. And don't forget to filter the data.
Thank you all for the detailed replies. The other day I faced the same problem. Finding a solution was not easy. It's good that you can find such detailed comments.
But so far I have not figured out how to do the subtraction.
If it’s not difficult for you to write a separate article about how you can do addition and subtraction, about multiplication and division, I don’t think about it yet, but if you manage to expand it in an article, I would be very grateful to you.
var a=10; var b=15;
for( alert('run'); b>0 ; b --,a++ ) alert('I am working');
alert('Add one to '+a+' To get result ');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question