//Basic usage with an expression placeholder
var person = 'Hao Ju Zheng';
console.log(`Yo! My name is ${person}`);
//Expressions work just as well with object literals
var user = {name: 'Zhen Ou Yun'};
console.log(`Thanks, ${user.name}`);
//Expression interpolation, One use is readable inline math.
var a = 50;
var b = 100;
console.log(`The number of JS frameworks is ${a + b} and not ${ 2 * a +b }`);
//Multi-line strings without needing \n\
console.log(`string text line 1
string text line 2`);
//Function inside expressions
function fn() {return "result"}
console.log(`foo ${fn()} bar`);
ES6 Template String
浏览器支持情况
目前解决浏览器兼容方案
用途
ES6 Features
ES6 Features兼容表
ES6 Template String PPT