Reply to post: Re: Advatage/disadvantge

Stanford Uni's intro to CompSci course adopts JavaScript, bins Java

patrickstar

Re: Advatage/disadvantge

Javascript/ECMAscript syntax actually only requires the semicolon when it's needed to resolve ambiguities.

Which might avoid cancer of the semi-colon, but leads to fun situations like:

return { foo: "bar" };

and

return

{

foo: "bar"

};

not doing the same thing.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon