The New Javascript is HERE! Discover 5 New Amazing FEATURESđŸ€Ż

Luna Rojas
5 min readJun 22, 2022

If you’re an aspiring web developer or simply want to learn about the latest and greatest features in JavaScript, you’ve come to the right place! In this article, we’ll be showcasing ten of the most useful features of JavaScript that every web developer should know about. Some are already available in all browsers, but some are still only compatible with certain versions of either Edge or Chrome. With that being said, let’s get started!

BigInt

Before ES11 the largest integer that could be referenced in JavaScript safely was Number.MAX_SAFE_INTEGER, which resolves to 9007199254740991 (aka 2⁔³ — 1). This may not be a daily problem for some of us, but for many applications it’s an amusingly tiny magnitude requiring programmers to use a wrapper like big-integer. (Note that the big-integer library is still useful as a polyfill.)

When using the traditional Number type to represent such large numbers, you will encounter unexpected rounding. (Notice these comments all apply to very small numbers as well, i.e. -2⁔³ — 1).

With ES11, the BigInt type is built in for these scenarios. You can define it by adding an n to the end of a number, as in mySafeBigNumber = 9007199254740992n.

--

--

Luna Rojas

Programming enthusiast and JavaScript lover😍 25 years of happiness😊 Occasionally, I like to express my thoughts into articlesđŸ§