+ 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 Respostas
+ 10
+ concat 2 strings, so
"1" + "2*2"
"12*2"
+ 1
Thanks CarrieForle first concatenate and then eval