Scroll Top

By WalkingTree  May 25,  2021

Newly added features in JavaScript

JavaScript has been a top choice for beginners. Over the years, JavaScript has evolved, nowadays you can almost see it everywhere. We can find it in front-end frameworks such as React, Angular, and Vue.js, and as well as the back-end such as Node.js, ElectronJS, and more! This year, JavaScript has come up with some new features, to help the developers in many ways. Let’s take a look at some of the new features of JavaScript. 

replaceAll method – The string replace method comes with one limitation, this method only replaces the first occurrence of the character, and the rest of the occurrences in the string remain the same. In order to replace all the characters, we have to use regular expressions. With the replaceAll method, the need for regular expression is eliminated. replaceAll replaces all the occurrences of the character specified. 

Using underscores as a separator for integers – In some situations, integers become so large that it’s almost difficult to count the number of elements present. With the introduction of this feature, developers can use underscores to separate the digits, without converting the data type to string. 

Promise.any() – Promise.any() is a new feature in JavaScript where it takes several iterable promises and returns the promise that is fulfilled first. 

Read on to learn more about the new JavaScript features.

Blogs

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.