javascript await

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 11:35 AM
Does anyone know if the 'async' and 'await' operators are valid in ServiceNow? I assume not since they are causing an error but wanted reach out and validate.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 11:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 11:53 AM
Hi, I don't belive they are compatible.
The current SNC javascript engine is EMCA5
https://docs.servicenow.com/bundle/newyork-application-development/page/script/JavaScript-engine-upg...
Which I assume is the 5th edition
https://en.wikipedia.org/wiki/ECMAScript
The functions await and async were not defined until 2017 - 8th edition
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
https://d...