+ 1
Why result is 24, but isn't 5 ?
3 odpowiedzi
+ 3
evaluation log of eval(a+b):
eval(a + b)
-> eval(1 + "2*2")
-> eval("1" + "2*2")
-> eval("12*2")
-> 12*2
-> 24
In JavaScript, integers will get automatically converted to strings if they share any + operators with strings.
+ 3
Seb TheS thanx
+ 1
Потому что b строка