Everything about JavaScript and new ECMAScript 2022 features

TechGig
3 min readFeb 23, 2022

JavaScript is one of the most popular and widely used programming languages in the world right now, and JavaScript is still evolving, and the next annual update to ECMAScript, which fully standardizes the language, is scheduled for July 2022. By March 2022, all new feature proposals that have reached stage four — proposals that have been signed off on by the ECMAScript editors, passed the test suite, and deployed in at least two implementations — will be included.

What is JavaScript?
JavaScript is one of the most popular and widely used programming languages in the world right now, and big companies like Netflix, Walmart, and PayPal build internal applications using it. You can work as a front-end developer or a back-end developer.as well as the back end.

What can you achieve with JavaScript for an extended period of time?
Because of massive community support and investments by large companies like Facebook and Google, you can now build full-fledged web or mobile apps as well as real-time networking applications like chats and video streaming services command-line tools, or even games with JavaScript. Here’s an example.

Where JavaScript code is executed.
JavaScript was designed to run only in browsers, so every browser has a JavaScript engine that can execute JavaScript code, for example, the JavaScript engines in Firefox and chrome are SpiderMonkey and v8 in 2009, a very clever engineer named Ryan Dahl took the open-source JavaScript engine in chrome and embedded it inside a C++ programme he called node the node is a C++ programme that includes Google’s v8 JavaScript engine.

In a nutshell, JavaScript code can be run in a browser or in node browsers, with node providing the runtime environment for our JavaScript code.

The new ECMAScript 2022 features
Let’s have a look at some of the new ECMAScript 2022 features that will be included in the es2022 version. There are a lot of great features planned for this new version of JavaScript, so let’s take a look at some of them.

Private class fields
So far, there hasn’t been an official method to hide JavaScript’s class-based private variables. What we mean is that if you had a class, say box, and you wanted to make this variable with the value of 200 as the private variable of this class itself, there was no way in JavaScript to do so, but this new specification, this new feature in JavaScript, allows you to do so.

Static variables
In JavaScript Previously, if you wanted to define a static variable or a static property on a class, you would see something like the class name dot pi and then 3.14 or whatever the value you want to set, but now you can use the static keyword itself, which has been available in typescript for quite some time.

Arr (. at)
Let’s say you have an array of numbers one two three four five six right so you have six elements over here and you want to access let’s start it with zero so there is no confusion so let’s say I want to access number three over here which also has an index of three so the way you would do it is with a notation like this but JavaScript now introduces another notation which is using array.at and then the index over here now the only difference between this versus this is that add also allows you to specify negative indexes.

--

--

TechGig

India's Largest Tech Community | 4.9 Million+ Developers | Guinness World Record Winner | Limca Book of Records