开发者_开发知识库My javascript code that produces a syntax error:
var x =
{
a: 123
};
The same code without an error:
var x = {
a: 123
};
What the heck?
Javascript adds implicit ";" at the end of lines sometimes, I suppose this is what happens, and results in
var x = ;
精彩评论