Hacker News new | ask | show | jobs
by earnubs 5842 days ago
FWIW If you're using JavaScript in PhotoShop the following produces an error because there's no semicolon after the second statement:

  for(i=10;i--) { /* do stuff */ }
So maybe that's an example of a JS implementation where it differs on optional semicolons.
1 comments

That doesn't work in any javascript interpreter. Semi-colons aren't optional inside the parenthesis of a for statement, according to the spec.

http://www.ecma-international.org/publications/files/ECMA-ST...

Section 7.9.2 (page 37)

Doh. Yes.