I was working through Kyle Simpson's You Don't Know JS Yet, and the coercion chapters did the thing good books do: they made me realise I'd been writing JavaScript for years while quietly avoiding the parts I didn't understand.
Not avoiding them deliberately. Avoiding them the way you avoid a creaky floorboard - instinctively, without noticing you've changed your route. I always used ===. I never thought hard about why, beyond "== is bad". That's not knowledge. That's a superstition that happens to produce correct code.
Kindly look through the work I made to further help delivering Kyle's work through npm cli.
It's free
No tiers, no trial, no email wall. just a normal js npm package where you can practice js quicks.
npx wtfjavascript
If you find a challenge that's wrong, tell me. And if the event loop panel ever disagrees with real Node, I especially want to know - it means my oracle missed a case.
wtf( js ) wtf, JavaScript?! - prove you actually know it
🗿 for JavaScript gigachads - and those about to become one
Every prompt takes h for a hint and s to skip.
Flags, for when you want to aim
wtfjs --list # every challenge, topic and difficulty
wtfjs --topic "Type Coercion" # drill one subject
wtfjs --count 20 # how many
wtfjs --easy 2 --medium 5 --hard 3 # pick your own mix
wtfjs --time 10 # ten-minute run
wtfjs --sudden-death # one wrong answer ends it
wtfjs --no-hints # +10 points a solve
284 challenges, and deliberately not all in one format :)
Credit where it's due
This exists because of other people's work:
You Don't Know JS Yet by Kyle Simpson - the reason I knew there was something to learn.

JavaScript Questions by Lydia Hallie - proof the format works.
Stack Overflow, and the people who spent years arguing about the abstract equality algorithm so I didn't have to.
The idea that these quirks are worth drilling isn't mine, and I'd rather point you at the sources than pretend otherwise. If you haven't read YDKJSY, read that first - this is practice, not instruction.
Top comments (0)