+ 1
Why the output is 8800481086, why not 169090?
var a ="88004"; var b="81086"; alert(a+b);
2 Answers
+ 2
Because you are concatenating two strings instead of adding two integers.
Imagine adding two words together: "one" + "two". The answer would not be "three" because those are words, not numbers. The answer is "onetwo."
If they are integers: 1+2 = 3.
+ 2
Thank you so much Joseph for your quick reply and explaining with example. thank againđ