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

docs(string): edit tagged template #510

This commit is contained in:
ruanyf 2017-10-01 07:12:15 +08:00
parent 71a8a26585
commit be04c5216a

View File

@ -742,7 +742,8 @@ msg // "The total is 30 (31.5 with tax)"
```javascript
function passthru(literals, ...values) {
let output = "";
for (let index = 0; index < values.length; index++) {
let index;
for (index = 0; index < values.length; index++) {
output += literals[index] + values[index];
}