字面量(Literal),又名直接量,即程序中直接使用的数据值。
// Null 字面量const n = null;// Undefined 字面量const u = undefined;// Boolean 布尔值字面量const b1 = true;const b2 = false;// Number 数值字面量const num = 1;const nan = NaN;// String 字符串字面量const hello = 'hello';const world = 'world';// Regexp 正则字面量const reg = /pattern/;// Template Literal 模版字面量const temp = `hello, ${world}`