ECMAScript 2017

ECMAScript 2017


ECMAScript 2017
 
In this tutorial, you will learn about ECMAScript 2017 or ES 2017:-
Introducing the new features that ECMAScript 2017 (ES8) adds to JavaScript :-
 
  • Async functions, await operator
  • Shared buffers and atomic operations
 
JavaScript async
 
In this tutorial, you will learn about JavaScript async() Function, An async function is a function declared with the async keyword, and the await keyword is permitted within it. The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.
 
Example 1 –
 
 
Output –
 
 
After two seconds