Member-only story
ES8 / ECMAScript2017
3. A Deep Dive into the Latest JavaScript Features — ES8
The JavaScript has been evolved a lot and one of the widely used language in the world. We are discussing about some core feature of ES8 / ECMAScript 2017 / ECMA2017, the iteration of the ECMAScript standard. Let’s talk about exciting features that can streamline your workflow and enhance your code.
In this article, we’ll delve into some of the key features introduced in ES8:
1. Async Functions and Await
We can add async keyword before function to make then asynchronous. And then we can use await keyword inside it.
By using async await , we can make our code look like synchronous.
async function test() {
const result = await fetch();
}Note: You can use await without async keyword. It is possible after ES13.
For more details: https://medium.com/@opensrc0/es13-ecma-script-2022-28129e07c65a
2. padStart and padEnd
We can add any character at start of string and end of string, to make string of specific length.
const str = "Jio";
str.padStart(5); // " Jio"
str.padEnd(5); // "Jio "
str.padStart(5, "*"); //…








