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?
200 "what does this print?" puzzles in JavaScript and Python, every answer checked by running it.
Real puzzles from the workbook, with their explanations. Pick an answer to see why.
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?
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.
Frontend, backend and Python interviews, and anyone who wants to stop guessing what code does.
Checkout happens on Gumroad, which emails you the download right after you pay.
PDF workbook and Offline quiz you open in any browser, as files you keep.
Yes. The Interview Sheet and the Daily Trap on this site are free and use the same style.