Understanding Javascript The Weird Part Parts Official
Everything else is truthy (including [] , {} , "0" ). The weird part: == does type coercion.
function outer() let secret = 'closed over'; return function inner() console.log(secret); ; understanding javascript the weird part parts
getObj(); // undefined Place { on same line as return . 10. NaN – Not a Number Weird part: NaN is a number type, and it’s not equal to itself. Everything else is truthy (including [] , {} , "0" )
function Dog(name) this.name = name; Dog.prototype.bark = function() return 'woof'; ; const d = new Dog('Rex'); d.bark(); // 'woof' Weird parts: Everything else is truthy (including []