How to add two numbers in JavaScript?

Please tell me, I have var a = 10; and var b = 15;
How can I fold?
October 3rd 19 at 01:43
11 answers
October 3rd 19 at 01:45
Solution
You should use Jquery for this
What kind of nonsense you suggest. Then you need to use a normal MVC framework, for example, Angular.js or Ember.js. - Chadrick_Spenc commented on October 3rd 19 at 01:48
Could you develop your idea? I tried but not working http://jsfiddle.net/28Dy9/, somehow outputs [object Object], not 25 - buck commented on October 3rd 19 at 01:51
This is because it is necessary to use the right tools, but not all there... gaquere not they be remembered. Here's a great example to follow: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition - Reagan65 commented on October 3rd 19 at 01:54
October 3rd 19 at 01:47
trolling is not counted
October 3rd 19 at 01:49
var c = a + b;
October 3rd 19 at 01:51
Oh, well, questions.
Have you a beginner was not? From straight sat down and started writing code? - Chadrick_Spenc commented on October 3rd 19 at 01:54
It would not hurt initially the search engine to ask - buck commented on October 3rd 19 at 01:57
This is an attempt to reproduce the famous picture. http://meta.stackoverflow.com/a/48195/235930 - Reagan65 commented on October 3rd 19 at 02:00
October 3rd 19 at 01:53
var c = Number(a)+Number(c);
alert(c);
p.s. Fellow newbies, before asking questions, Google Google.
I even put a plus))) - Chadrick_Spenc commented on October 3rd 19 at 01:56
October 3rd 19 at 01:55
Also try to deploy apache and php, then just send an ajax request to the file using this library https://github.com/Herzult/SimplePHPEasyPluswill combine 2 numbers and return them to you in json. And don't forget to filter the data.
October 3rd 19 at 01:57
Thank you all for your detailed answers. Recently faced with the same problem. The decision to find was not easy. Good that you can find such detailed comments.
But still did not understand how to do subtraction.
If You could write a separate article on how to do addition and subtraction, multiplication and division still do not think, but if you manage to deploy it in the article - would be very grateful.
October 3rd 19 at 01:59
Pathetic plagiarism.
ssRUr.gif
Don't you think that all this was originally okay? - Chadrick_Spenc commented on October 3rd 19 at 02:02
Your other readers of this question - hardly. - buck commented on October 3rd 19 at 02:05
I doubt very much) please See the first response - Reagan65 commented on October 3rd 19 at 02:08
I never understood why zaminusovali last answer:) - buck commented on October 3rd 19 at 02:11
because without jquуry js not js - Chesley_Ols commented on October 3rd 19 at 02:14
October 3rd 19 at 02:01
tu2.png
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 ');
October 3rd 19 at 02:03
kak-skladyvat-dvoichnye-chisla1.jpg
October 3rd 19 at 02:05
At least a new account for trolling started, or something.
what's wrong with trolling from your Akka?) - Chadrick_Spenc commented on October 3rd 19 at 02:08
Apparently you are just new user and I'm afraid to grab TM) I Hope the joke will understand) - buck commented on October 3rd 19 at 02:11
Not afraid and I'm not a new user, it's just unprofessional ) - Reagan65 commented on October 3rd 19 at 02:14

Find more questions by tags jQueryMathematicsJavaScriptAlgorithms