const test = null
assert.ok(true, test.msg) //即使assert通过,test.msg依然会被编译并报错
console.log(false.msg) 输出: undefined
console.log("".msg) 输出: undefined
console.log(null.msg) 报错: Uncaught TypeError: Cannot read properties of null (reading 'msg')
console.log(undefined.msg) 报错: Uncaught TypeError: Cannot read properties of undefined (reading 'msg')
console.log(1.msg) 报错: Uncaught SyntaxError: Invalid or unexpected token