JavaScript uses the same symbol for addition concatenation. But it chooses based on... vibes?
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. javascript weird parts
const obj = { name: 'John', printName: function() { setTimeout(function() { console.log(this.name); // undefined }, 1000); } }; JavaScript uses the same symbol for addition concatenation
(function() { console.log("This will be printed immediately"); })(); // undefined }
Type coercion is JavaScript's attempt to be "helpful" by automatically converting one data type into another during operations. While convenient, it often produces results that seem like nonsensical riddles.