What’s new in ES2021

Let’s get started with the first of the new ES2021 features:

String.prototype.replaceAll

String.replace is a useful method that allows us to replace a pattern in a string with something else. The problem is that if we want to use a string as a pattern and not a RegEx, only the first occurrence will get replaced.

Get hands-on with 1200+ tech skills courses.