Open bd1354 opened 1 month ago
https://javascript.info/structure at this page it says that; alert("Hello")
[1, 2].forEach(alert); if you remove semicolon at the first line of code that causes error but I got no error It worked without problem
Can't be.
Maybe your environment hide the error? Does it show hello then 1 then 2 ?
It must get error as the engine should interpret as
alert("Hello")[1, 2].forEach(alert)
https://javascript.info/structure at this page it says that; alert("Hello")
[1, 2].forEach(alert); if you remove semicolon at the first line of code that causes error but I got no error It worked without problem