Reserved Words as Identifiers
In ECMAScript, reserved words are identifiers that have special meaning. For example, the reserved word var indicates a variable declaration. You can't use reserved words as variable names, labels, or function names in JavaScript or ECMAScript. Since SuiteScript 2.1 supports a newer ECMAScript version (ECMAScript 2023) than SuiteScript 2.0 (ECMAScript 5.1), the list of reserved words is different. SuiteScript 2.1 is stricter about not letting you use reserved words in scripts.
|
Scenario |
SuiteScript 2.0 Behavior |
SuiteScript 2.1 Behavior |
|---|---|---|
|
You use the
|
The script executes and does not generate an error. The |
The script generates a syntax error. The |
To avoid this issue, don't use any reserved words from any edition of ECMAScript (including those planned for future editions using ES.Next). For more information, see SuiteScript Reserved Words.