Please give me the answers to the two questions below | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please give me the answers to the two questions below

1. var x = "5" + 2 + 3; 2. var x = 2 + 3 + "5";

2nd Apr 2018, 5:31 PM
Akpens
2 Answers
+ 14
1 -> 523 2 -> 55
2nd Apr 2018, 5:37 PM
Jaydeep Khatri
Jaydeep Khatri - avatar
+ 2
hello first : "5"+2 -> "52" + 3 -> "523" string concat only 2nd : 2+3 -> 5 + "5" -> "55" eval add & string concat
2nd Apr 2018, 5:38 PM
Valérie SPICHER