Javascript Weird Parts !new! Review
Put { on the same line as return . 6. this – The Shape-Shifter In most languages, this is predictable. In JavaScript, it depends on how you call the function.
Arrow functions don't have their own this —they inherit from the parent scope. That’s often a lifesaver, but it’s another thing to memorize. Every value in JS is inherently truthy or falsy. There are exactly 8 falsy values : javascript weird parts
console.log(typeof NaN); // "number" According to the IEEE 754 floating-point spec (which JS uses), NaN is a numeric data type that represents an invalid number. It’s a number that isn’t a number. The weirdness doesn't stop there: Put { on the same line as return