反撇号(`) 反单引号
var user = {name: Vicent};
console.log(`my name is ${user.name}`);
打印结果:my name is Vicent
http://www.infoq.com/cn/articles/es6-in-depth-template-string
本文共 216 字,大约阅读时间需要 1 分钟。
var user = {name: Vicent};
console.log(`my name is ${user.name}`);
打印结果:my name is Vicent
http://www.infoq.com/cn/articles/es6-in-depth-template-string
转载于:https://www.cnblogs.com/yourstars/p/6111374.html