---
title: "Discussion on \"Replace 'em All With ES2021\" | Hashnode"
description: "Discussion on \"Replace 'em All With ES2021\". The newly introduced String.prototype.replaceAll() method removes the need for using a regex to replace multiple occurrences of a substring in a given string\n\nIf you have ever worked with strings in JavaScript, you know what a pain it is to replace a..."
url: "https://hashnode.com/posts/replace-em-all-with-es2021/5fbbd5b630fc2d1b859e1f4d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Replace 'em All With ES2021](https://pratik.hashnode.dev/replace-em-all-with-es2021?utm_source=hashnode&utm_medium=feed)

The newly introduced String.prototype.replaceAll() method removes the need for using a regex to replace multiple occurrences of a substring in a given string If you have ever worked with strings in JavaScript, you know what a pain it is to replace a...

Nov 23, 2020 · 4 min read · pratik.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#string](https://hashnode.com/tag/string)

## Written by

[Pratik Chaudhari](https://hashnode.com/@pratikc)

@pratikc · Mumbai, India

  
[View profile](https://hashnode.com/@pratikc)

Software Engineer | Tech Aficionado | Voracious Reader | Persuasive Writer

## Responses 1

Markdown supported · ⌘↵ to post

[Favourite Jome](https://hashnode.com/@Favourite)

[Nov 24, 2020](https://hashnode.com/posts/replace-em-all-with-es2021/5fbbd5b630fc2d1b859e1f4d/comment/5fbcee1630fc2d1b859e3382)

Real nice update. Thanks for sharing
