用一对反引号(`)标识,它可以当作普通字符串使用,也可以用来定义多行字符串,也可以在字符串中嵌入变量,js表达式或函数,变量、js表达式或函数需要写在${ }中。 ``` var str = `abc def gh`; console.log(str); let name = "小明"; function a() { return "ming"; } console.log(`我的名字叫做${name},年龄${17+2}岁,性别${'男'},游戏ID:${a()}`); ```