== does type coercion.
Because functions are objects, you can attach properties and methods to them, pass them as arguments to other functions, and return them from functions. This "First-Class" status is what makes JavaScript incredibly powerful for functional programming. 3. The "This" Keyword understanding javascript the weird part parts
Always prefer === (no coercion), except when checking null == undefined . == does type coercion
Imagine a function inside another function. When the outer function finishes, its variables are usually cleared from memory. However, if the inner function still needs those variables, JavaScript keeps them "closed in" a special memory space. This allows for powerful patterns like private variables and data encapsulation, which JavaScript didn't have natively for a long time. 5. Coercion: The "Double Equals" Trap understanding javascript the weird part parts