Ecmascript 2021 new features in JavaScript. replaceAll , Promise.any , logical assignment , numerical separator

#javascript #web-development #programming #developer

What is GEEK

Buddha Community

Abigale  Yundt

Abigale Yundt


What’s New in ES2021/ES12?

ES2021 is the latest version of the EcmaScript specification as of 2021.

It has the newest features of JavaScript, which are being added into various runtime environments like browsers and Node.js.

In this article, we’ll look at the new features that come with ES2021.

  • String.prototype.replaceAll
  • WeakRef
  • Finalizers
  • Promise.any()
  • Logical Assignment Operator
  • Numeric Separator

#software-development #web-development #javascript #programming #es2021

Julie  Donnelly

Julie Donnelly


JavaScript ES2021 Exciting Features

Every year, JavaScript update adds new features. This year ES2020 or ES11 was released (Read ES2020 features article), with ES2021 or ES12 expected to be released in mid-2021.

New features that are added to JavaScript each year go through a four-stage process, with the fourth stage being the last one. In this article, I will discuss the features that have already reached stage four and are added to the Google Chrome V8 engine.

List of the new features discussed in this article

  • String.prototype.replaceAll
  • Promise.any
  • Logical Operators and Assignment Expressions
  • Numeric Separators
  • Intl.ListFormat
  • dateStyle and timeStyle options for Intl.DateTimeFormat

#javascript-introduction #javascript #es12 #javascript-tips #es2021

Marcus  Flatley

Marcus Flatley


Awesome Features Coming to JavaScript in ES2021!

ECMA in 2021 brings new features such as a string replaceAll function, number literals, weak refs, and logical operator assignment! In this video, we take a look at examples and breakdown of how each feature works.

#javascript #es2021

Lawrence  Lesch

Lawrence Lesch


JavaScript ES2021 (ES12) Approved Features

New features in JavaScript ES2021 (ES12) that have been approved by the Ecma General Assembly

About a year ago, I wrote an article about the new features that JavaScript would incorporate in its ES2021 specification.

Today, in June 2021, these features, along with others, have been approved.

In this article, I elaborate and detail what I wrote more than a year ago, but with the addition of the final features that have been approved.


  • String.prototype.replaceAll()
  • Promise.any() and AggregateError
  • WeakRefs and FinalizationRegistry
  • Logical assignment operators
  • Numeric separators


String.prototype.replaceAll() replace all instances of a substring in a string with another string value, without using a global regexp.

Until now, the most common way of doing this was to use a global regexp.

Consider the following code where we use a regular expression to replace the “+” character with an empty character:

const fullname= 'fullname=Jhon+Hannibal+Smith';
const fullnameFormated = fullname.replace(/\+/g, ' ');
//output: Jhon Hannibal Smith

This approach has the downside of requiring a regular expression that uses special characters to achieve this. But the use of regular expressions is not easy and is error-prone and a common source of bugs.

#javascript #programming #coding #es2021

Welde Tekle

Welde Tekle


JavaScript ES2021 Features With Simple Examples

ES2021 is the version of ECMAScript corresponding to the year 2021. This version doesn’t include as many new features as those that appeared in ES6 (2015). However, some useful features have been incorporated.

This article introduces the features provided by ES2021 in easy code examples. In this way, you can quickly understand the new features without the need for a complex explanation.

Of course, it’s necessary to have a basic knowledge of JavaScript to fully understand the best ones introduced.

The new JavaScriptfeatures in ES2021 are:

➡️ String.prototype.replaceAll

➡️ Promise.any

➡️ WeakRef

➡️ Logical assignment operators

➡️ Numeric separators

#es2021 #es6 #javascript #nodejs #programming