[] + {} — do you know what that prints, or do you think you know?
That gap is the whole idea behind What's the Output?
— a daily Wordle-style game: one JS snippet per day, three tries to type
exactly what it prints, hints when you miss, an explanation of the trap when
you're done.
The rule that shaped the build: on a site whose brand is "predict the
output," publishing a wrong answer even once is death. So the puzzle bank is
defended by tests, not care:
- Every snippet is executed in real Node inside the test suite, and the captured stdout must equal the declared answer — run twice, so nondeterministic snippets can't sneak in.
- A "winnability" test proves that typing the revealed answer always wins
(this caught two puzzles that were impossible to win — my answer normalizer
stripped
""down to an empty string while the server hashed it as-is). - Hints are linted too: a hint like "5 characters" on a boolean output is
the answer (
false= 5 letters). There's a test that rejects that pattern now.
Stack, for the curious: Next.js ISR (the puzzle rotates at 00:00 UTC with
no deploy), no database, no accounts — streaks live in localStorage. The
answer ships as a SHA-256 hash; your guess is normalized and hashed
client-side. Yesterday's puzzles become public explanation pages.
It's free, and there's a new one every day at 00:00 UTC:
whatstheoutput.online. If you break your
streak on day one, the explanation is the consolation prize.
Top comments (0)