变量值
¥Variable Values
变量值由任意文本组成,可以选择用单引号 ('
) 或双引号 ("
) 括起来。
¥Variable values are comprised by any arbitrary text, which can optionally be wrapped inside
single ('
) or double ("
) quotes.
带引号的变量可以跨多行,而不带引号的变量则限制为一行。
¥Quoted variables can span across multiple lines, while non quoted ones are restricted to a single line.
需要注意的是,Node.js 解析时,所有值都会被解释为文本,这意味着任何值在 Node.js 内部都会生成 JavaScript 字符串。例如,以下值:0
、true
和 { "hello": "world" }
将分别生成字符串 '0'
、'true'
和 '{ "hello": "world" }'
(而非数字零)、布尔值 true
和具有 hello
属性的对象。
¥Noting that when parsed by Node.js all values are interpreted as text, meaning that any value will
result in a JavaScript string inside Node.js. For example the following values: 0
, true
and
{ "hello": "world" }
will result in the literal strings '0'
, 'true'
and '{ "hello": "world" }'
instead of the number zero, the boolean true
and an object with the hello
property respectively.
有效变量示例:
¥Examples of valid variables:
MY_SIMPLE_VAR = a simple single line variable
MY_EQUALS_VAR = "this variable contains an = sign!"
MY_HASH_VAR = 'this variable contains a # symbol!'
MY_MULTILINE_VAR = '
this is a multiline variable containing
two separate lines\nSorry, I meant three lines'