undefined
和 null
const result = true.unknownProperty;
會發生什麼事?
const result = null.unknownProperty;
會發生什麼事?
undefined
或 null
?給定以下 JavaScript 程式碼。
let foo;
function bar() {}
const baz = (x) => x;
下列哪個表達式會評估為 undefined
?其餘的會評估為 null
。