mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-29 13:52:22 +00:00
commit
9276083cf7
@ -885,7 +885,8 @@ String.raw`Hi\\n`
|
|||||||
```javascript
|
```javascript
|
||||||
String.raw = function (strings, ...values) {
|
String.raw = function (strings, ...values) {
|
||||||
let output = "";
|
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];
|
output += strings.raw[index] + values[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user