mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs(string-methods): edit replaceAll(), fixed #1018
This commit is contained in:
+2
-1
@@ -505,10 +505,11 @@ function passthru(literals) {
|
||||
let i = 0;
|
||||
|
||||
while (i < literals.length) {
|
||||
result += literals[i++];
|
||||
result += literals[i];
|
||||
if (i < arguments.length) {
|
||||
result += arguments[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user