Skip to content
On this page

字符串的三种书写方式

分别是单引号、双引号和反引号。其中反引号是ES6新增的一种字符串书写方式,它可以用来书写多行字符串和嵌入变量。

javascript
let str1 = 'hello'
let str2 = "world"
let str3 = `hello world`

Released under the MIT License.