Skip to content
Workbook

Output Questions Workbook

200 "what does this print?" puzzles in JavaScript and Python, every answer checked by running it.

Try 20 free samples

Real puzzles from the workbook, with their explanations. Pick an answer to see why.

JavaScript#1 · Types and coercion

Zero, empty and null

function pick(v) {
  return JSON.stringify([v || "none", v ?? "none"]);
}
console.log(pick(0));
console.log(pick(""));
console.log(pick(null));

What does this print?

1 / 20

What's inside

  • 100 JavaScript and 100 Python puzzles, warm-up to expert
  • Every output verified on Node.js 26 and Python 3.14
  • Short explanations and a one-line rule for each
  • Chapter cheat sheets with the rules in one place

The questions interviewers use to test whether you really know a language: closures, the event loop, this, coercion, mutability, default arguments, generators and more. Each puzzle has four options, the real output, a plain explanation and a rule to remember.

Format

  • PDF workbook
  • Offline quiz you open in any browser

Who it's for

Frontend, backend and Python interviews, and anyone who wants to stop guessing what code does.

Questions

How do I get it?

Checkout happens on Gumroad, which emails you the download right after you pay.

What exactly do I download?

PDF workbook and Offline quiz you open in any browser, as files you keep.

Can I try something free first?

Yes. The Interview Sheet and the Daily Trap on this site are free and use the same style.