1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +00:00

Merge pull request #1066 from MrCare/patch-1

一处笔误
This commit is contained in:
Ruan YiFeng 2021-08-01 08:53:05 +08:00 committed by GitHub
commit 5eb76ed539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,7 @@ String.prototype.replaceAll(searchValue, replacement)
`replaceAll()`的第二个参数`replacement`是一个字符串,表示替换的文本,其中可以使用一些特殊字符串。
- `$&`:匹配的字符串。
- `$&`:匹配的字符串。
- `` $` ``:匹配结果前面的文本。
- `$'`:匹配结果后面的文本。
- `$n`:匹配成功的第`n`组内容,`n`是从1开始的自然数。这个参数生效的前提是第一个参数必须是正则表达式。