0
Hi everyone, why the result of console.log(eval("2*2"+4)) equal 48 ?
2 Answers
+ 3
Since you are concatenating a string and number js tries to coerce the int into str which results in "2*24" which is then evaluated by eval as 48.
+ 1
Dam Javascriptđ€Šââïž