Comment on Semicolons in JavaScript are optionalComments−soren_dahl16yFWIW 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.−lhorie16yThat 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)−soren_dahl16yDoh. Yes.
Comments
FWIW If you're using JavaScript in PhotoShop the following produces an error because there's no semicolon after the second statement:
So maybe that's an example of a JS implementation where it differs on optional semicolons.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.