output of 1+"2"+3"4" in javascript
Answers
Answered by
0
Answer:
Since you have a string data type first anything that comes after the “+” operator will be concatenated to your data, i.e “123”.
However, if you were to have the string data type at the end in place of the number , i.e
1+2+ “3” your result would be “33” as “+” on two numbers would result in an addition operation and then that result would be concatenated to your string.
You can try this in your browser console by clicking on the F12 key on your keyboard or checking out the options.
Similar questions
Math,
24 days ago
English,
24 days ago
English,
1 month ago
English,
8 months ago
Computer Science,
8 months ago