By WalkingTree May 25, 2021
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
In the last blog, we saw the basics of how we could setup Internationalization for React applications using…
Technology has made the world smaller and brought us all closer. Anyone on the other side of the…
According to the official React documentation, “A Context provides a way to pass data through the component tree…
This blog is dedicated to yet another useful React hook “useReducer” in continuation to my previous blog, and…
Introduction Most of the apps these days are developed using hybrid frameworks. One of the most important factors…