+ 4
[SOLVED] Javascript eval("1"+"2*2") == 24 ????
Given var a = "1" var b = "2*2" console.log(eval(a+b)) I don't understand why the result is 24 and not 14 đČ
2 RĂ©ponses
+ 10
+ concat 2 strings, so
"1" + "2*2"
"12*2"
+ 1
Thanks CarrieForle first concatenate and then eval