Template literals are string literals allowing embedded expressions. You can use multi-line strings and string interpolation features with them. They were called "template strings" in prior editions of the ES2015 specification. http://es6.ruanyi
反引号 反引号位 (`) 位于键盘的Tab键的上方.1键的左方.注意与单引号(')位于Enter键的左方的区别. 在Linux中起着命令替换的作用.命令替换是指shell能够将一个命令的标准输出插在一个命令行中任何位置. 如下,shell会执行反引号中的date命令,把结果插入到echo命令显示的内容中. [root@localhost sh]# echo The date is `date` The date is 2016年 08月 7日 星期日 19:25:43 CST 单引号,双引号
一.单引号 str='this is a string' 单引号字符串的限制: 单引号里的任何字符都会原样输出,单引号字符串中的变量是无效的: 单引号字串中不能出现单引号(对单引号使用转义符后也不行). 二.双引号 your_name='qinjx' str="Hello, I know your are \"$your_name\"! \n" 双引号的优点: 双引号里可以有变量 双引号里可以出现转义字符 三.反引号(``) 命令替换是指shell能够将一个命令的标