Does javascript execution stop when an invalid line is encountered?

后端 未结 4 2168
孤独总比滥情好
孤独总比滥情好 2021-02-07 05:33

If the browser is executing JavaScript on a web page and it encounters invalid JavaScript (e.g. somerandomthingy;) Does execution of JavaScript stop at that point, or do async o

4条回答
  •  独厮守ぢ
    2021-02-07 06:33

    I think execution stops. If you set an alert after a line of code that breaks, you will not reach the alert, which leads me to believe that execution stops. I'm not sure if the same is true of asynch XmlHtttpRequests, though.

提交回复
热议问题