Skip to content

Commit cbd7d78

Browse files
authored
Merge pull request #3100 from joaquinelio/patch-11
2 parents 4a98342 + dc9683e commit cbd7d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

9-regular-expressions/17-regexp-methods/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ Using a function gives us the ultimate replacement power, because it gets all th
232232

233233
This method is essentially the same as `str.replace`, with two major differences:
234234

235-
1. If the first argument is a string, it replaces *all occurences* of the string, while `replace` replaces only the *first occurence*.
235+
1. If the first argument is a string, it replaces *all occurrences* of the string, while `replace` replaces only the *first occurrence*.
236236
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`.
237237

238-
The main use case for `replaceAll` is replacing all occurences of a string.
238+
The main use case for `replaceAll` is replacing all occurrences of a string.
239239

240240
Like this:
241241

0 commit comments

Comments
 (0)