Sitemap
Stackademic

Stackademic is a learning hub for programmers, devs, coders, and engineers. Our goal is to democratize free coding education for the world.

ES8 / ECMAScript2017

3. A Deep Dive into the Latest JavaScript Features — ES8

3 min readFeb 15, 2024

--

Press enter or click to view image in full size

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, "*"); //…

--

--

✅ open src 🚀 🚀
✅ open src 🚀 🚀

Written by ✅ open src 🚀 🚀

1. Open source contributor, Architect at Jio Platform Ltd. and The Author of fe-pilot. https://github.com/opensrc0/fe-pilot/

Stackademic
Stackademic

Published in Stackademic

Stackademic is a learning hub for programmers, devs, coders, and engineers. Our goal is to democratize free coding education for the world.