Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dc9683e

Browse files
misspell
1 parent 55d806d commit dc9683e

File tree

1 file changed

+2
-2
lines changed
  • 9-regular-expressions/17-regexp-methods

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /