Problem Statement
Which option correctly contrasts instanceof and typeof?
Explanation
typeof reports primitive types (except that typeof null is 'object') and 'function' for functions.
instanceof tests whether an object’s prototype chain contains a constructor’s prototype.
Code Solution
SolutionRead Only
console.log(typeof 42); // 'number' console.log(typeof null); // 'object' (quirk) console.log([] instanceof Array); // true
