Behavior of for...each...in Statement
The for...each...in statement was removed as part of ECMA-357 (4x) and should no longer be used. In SuiteScript2.0, the for...each...in statement is accepted. In SuiteScript 2.1, a SyntaxError is thrown if you try to use the for...each...in statement in your script.
|
Scenario |
SuiteScript 2.0 Behavior |
SuiteScript 2.1 Behavior |
|---|---|---|
|
Use a
|
The |
The following error is generated: SyntaxError: SyntaxError: <eval>:3:4 Expected ( but found each for each ( var value in obj) { |