{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":684,"path":"api-reference/scripts/set-es12-mode-scripts.md","title":"Turn on ECMAScript 2021 \\(ES12\\) mode for a script","bundle":null,"doc_type":null,"release":"australia","body":"\n# Turn on ECMAScript 2021 \\(ES12\\) mode for a script\n\nUse the latest JavaScript features supported with ECMAScript 2021 \\(ES12\\) mode in server-side scripts in applications that use ES5 Standards mode or Compatibility mode.\n\n## Before you begin\n\nRole required: delegated developer role or admin\n\n## About this task\n\nTurning on ECMAScript 2021 \\(ES12\\) mode for individual scripts is an option for scripts in global or scoped applications configured to use ES5 Standards mode or Compatibility mode. All scripts in applications with the JavaScript mode set to ECMAScript 2021 \\(ES12\\) use ECMAScript 2021 \\(ES12\\). Switching the JavaScript mode to ECMAScript 2021 \\(ES12\\) for an existing script might change the behavior of the script. For more information, see [Considerations for switching JavaScript modes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/considerations-switching-javascript-mode.md).\n\n**Note:** Global applications can use ECMAScript 2021 \\(ES12\\) mode for individual scripts but not across the application.\n\n## Procedure\n\n1.  Navigate to a form with a script field.\n\n    For example, to open a script include form, navigate to **All** &gt; **System Definition** &gt; **Script Includes** or enter `sys_script_include.list` in the navigation filter.\n\n2.  Select an existing script or **New**.\n\n3.  Select **Turn on ECMAScript 2021 \\(ES12\\) mode**.\n\n    \\[Omitted image \"script-js-mode.png\"\\] Alt text: Option to turn on ECMAScript 2021 ES12 mode for a script.\n\n    **Note:** This option is read only for scripts in applications with the JavaScript mode set to ECMAScript 2021 \\(ES12\\), which automatically use ECMAScript 2021 \\(ES12\\).\n\n4.  Select **Submit** or **Update** to save your changes.\n\n\n**Parent Topic:**[JavaScript modes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_JS_modes.md)\n\n"}}