js is mutant C with dementia - hacked together over over a fortnight, full of inconsistencies and weird corners.
console.log(1 + "2"); // "12"
console.log(1 - "2"); // -1
console.log(NaN === NaN); // false
console.log(+0 === -0); // true
const obj = {};
console.log(obj.foo); // undefined, not an errorAlso I suppose my memory could be pretty foggy as I don't think I've looked at the spec since about 2014.