1)直接使用變量
// before var str = 'test'; console.log(str + "123"); // now var str = 'test'; console.log(`${str}123`);
備注:如需使用字符$或{,請使用`\$`或`\{`
2)多行書寫
// before document.write( '<div>' + '<span>test<span>' + '</div>') // now document.write(`<div> <span>test<span> <div>`);