Sitemap
Stackademic

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

ES7 / ECMAScript2016

2. A Deep Dive into the Latest JavaScript Features — ES7

2 min readFeb 14, 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 ES7 / ECMAScript 2016 / ECMA2016, 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 ES7:

1. Exponentiation Operator

It returns the first argument raised to the power of the second argument. Does the same thing as Math.pow()

3 ** 3 = 27
4 ** 2= 16

2. Array.prototype.includes

Check if particular value exists in array or not. Return true if match found, otherwise returns false .

["x", "y", "z"].includes("x"); // true
["x", "y", "z"].includes("m"); // false
["xy", "xyz", "z"].includes("x"); // false

3. Trailing Commas in Function Parameters

We can have a trailing comma like [9,8,] in array. We can have trailing commas in function parameters and arguments.

const maths = (a,b,c,)=> console.log(a,b,c)
maths(9,8,7) // Output: 9,8,7

Thank you for reading until the end. Before you go, Please consider clapping and following.

Javascript is weird, I like the weird things. Keep Smiling.

Useful Links:

Read ES6 — Read ES7 — Read ES8 — Read ES9 — Read ES10 — Read ES11

Read ES12 — Read ES13 — Read ES14 — Read ES15

--

--

✅ 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.