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

Update string.md

This commit is contained in:
zwdsjl 2017-11-04 14:18:35 +08:00 committed by GitHub
parent 2ac6e76b38
commit 44c6a81168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -885,7 +885,8 @@ String.raw`Hi\\n`
```javascript
String.raw = function (strings, ...values) {
let output = "";
for (let index = 0; index < values.length; index++) {
let index;
for (index = 0; index < values.length; index++) {
output += strings.raw[index] + values[index];
}