首页 > 技术文章 > ` 模板字符串,告别打印输出多行

yourstars 2016-11-28 21:01 原文

反撇号(`) 反单引号 

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

推荐阅读