mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-29 05:42:20 +00:00
Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages
This commit is contained in:
commit
f7f80e5472
@ -652,7 +652,7 @@ var b = 10;
|
||||
|
||||
tag`Hello ${ a + b } world ${ a * b }`;
|
||||
// 等同于
|
||||
tag(['Hello ', ' world ', '''], 15, 50);
|
||||
tag(['Hello ', ' world ', ''], 15, 50);
|
||||
```
|
||||
|
||||
上面代码中,模板字符串前面有一个标识名`tag`,它是一个函数。整个表达式的返回值,就是`tag`函数处理模板字符串后的返回值。
|
||||
|
Loading…
x
Reference in New Issue
Block a user