JavaScript Riddles For Fun And Profit
summary
A rapid sequence of runnable puzzles shows concrete gotchas: a number X can satisfy X - X !== 0 for NaN and ±Infinity, object literal computed keys stringify an empty object into a weird property name, arrow functions have no prototype so they fail as constructors, the spread operator skips a generator’s returned value so spread ignores generator return, and automatic semicolon insertion plus the comma operator produces surprising array and loop behavior.
AI-written summary · about








