Understanding Javascript The Weird Part Parts -
Here’s a structured guide to understanding the classic (and famously quirky) areas of JavaScript—often referred to as the “weird parts” made popular by Anthony Alicea’s course “JavaScript: Understanding the Weird Parts” . The weird part: You can use variables before they’re declared.
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. understanding javascript the weird part parts
| Binding Rule | Example | this value | |-------------------|----------------------------------|----------------------------| | Default | fn() | window (strict: undefined ) | | Implicit (object) | obj.fn() | obj | | Explicit | fn.call(obj) , fn.apply(obj) | obj | | new binding | new Fn() | new instance | Here’s a structured guide to understanding the classic
function getObj() return // ASI adds semicolon here → returns undefined ok: true ; understanding javascript the weird part parts