Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 573 Bytes

File metadata and controls

29 lines (17 loc) · 573 Bytes

字符串就是被引号包裹起来的任意的值。

单引号或双引号效果是一样的:

'this is a string'

"this is also a string"

为了保持一致的风格,本教程中我们将只使用单引号。

挑战:

创建一个名为 strings.js 的文件。

在文件中像这样创建一个名为 someString 的变量:

const someString = 'this is a string'

使用 console.log 打印变量 someString 到终端。

运行下面的命令来检查你的程序是否正确:

javascripting verify strings.js