Why Browser Is Not Throwing Exception For Syntax Error?
I accidentally wrote a wrong JavaScript syntax (I think so). code is var temp = {}; temp.a = 34; height:34, //should fail here. temp.b = 56; jsfiddle is syntax is
Solution 1:
A colon can be used to label a statement, and that's what's happening here. There are no errors in your code, it's intended behavior.
Edit: better resource on labels. :)
Post a Comment for "Why Browser Is Not Throwing Exception For Syntax Error?"