+ 1
12th Sep 2019, 9:54 PM
UraL
3 Answers
+ 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.
12th Sep 2019, 10:12 PM
Seb TheS
Seb TheS - avatar
+ 3
Seb TheS thanx
12th Sep 2019, 10:19 PM
UraL
+ 1
Потому что b строка
12th Sep 2019, 10:00 PM
Marina Vasilyova
Marina Vasilyova - avatar