From dc9683e9da7ba86d6e31948cabc7aa67f6e8ae53 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Wed, 13 Jul 2022 08:36:44 -0300 Subject: [PATCH] misspell --- 9-regular-expressions/17-regexp-methods/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/9-regular-expressions/17-regexp-methods/article.md b/9-regular-expressions/17-regexp-methods/article.md index 0cafbbeb..897d0ffb 100644 --- a/9-regular-expressions/17-regexp-methods/article.md +++ b/9-regular-expressions/17-regexp-methods/article.md @@ -232,10 +232,10 @@ Using a function gives us the ultimate replacement power, because it gets all th This method is essentially the same as `str.replace`, with two major differences: -1. If the first argument is a string, it replaces *all occurences* of the string, while `replace` replaces only the *first occurence*. +1. If the first argument is a string, it replaces *all occurrences* of the string, while `replace` replaces only the *first occurrence*. 2. If the first argument is a regular expression without the `g` flag, there'll be an error. With `g` flag, it works the same as `replace`. -The main use case for `replaceAll` is replacing all occurences of a string. +The main use case for `replaceAll` is replacing all occurrences of a string. Like this: