Read the snippet
Trace the values and follow the order. What changes? What stays the same?

A little JavaScript curiosity
Read the code. Predict the output. Peek at the why. Quick puzzles for JavaScript learners who want to understand what happens next.
Try a puzzleStart with a three-puzzle trail: Values → Arrays → Async. No signup needed. Or peek at the example below.
Back for more? All 15 free puzzles · Saved practice
Choose a topic or find a classroom resource →

Less setup.
More “oh, I get it.”
What does this code print?
console.log(1 + "2" + 3);Just an example. No signup, saved answers, or code execution here.
THREE SMALL MOVES
No editor to configure. No blank page to fill. Just a few lines of JavaScript and a reason to look a little closer.
Trace the values and follow the order. What changes? What stays the same?
Choose the output before you see the answer. A surprise is a useful place to start.
Get a step-by-step explanation, not just a green tick. Take the idea to your next snippet.
YOUR NEXT PEEK
Try the examples here, then explore the free starter set.
Free
15 JavaScript puzzles to read, predict and understand.
Play as a guest, or save across devices with an optional account.
$9 USD · once
45 additional puzzles for a deeper look at familiar JavaScript surprises.
A planned one-time pack, not a subscription. Leave your email below if you’d like a launch notification.
Browse the full contents and four snippet previews. Answers stay under wraps here; each puzzle is prepared with four choices and a three-step explanation.
Captured bindings, private state, loop scope, and factory functions.
Snippet preview · Sibling closures
function box() {
let n = 2;
return { add: () => n++, read: () => n };
}
const b = box();
b.add();
console.log(b.read());What’s the output? Answer withheld in this preview.
Shallow copies, shared objects, array methods, and reassignment.
Snippet preview · Just one level deep
const first = { inner: { n: 1 } };
const copy = { ...first };
copy.inner.n = 8;
console.log(first.inner.n);
console.log(first === copy);What’s the output? Answer withheld in this preview.
Primitive conversion, equality, logical operators, and numeric surprises.
Snippet preview · Arrays meet plus
console.log([1, 2] + [3]);
console.log([] + 4);What’s the output? Answer withheld in this preview.
Executors, chains, recovery, await, and microtask checkpoints.
Snippet preview · The next link waits
const p = Promise.resolve();
p.then(() => console.log("A"))
.then(() => console.log("C"));
p.then(() => console.log("B"));
console.log("D");What’s the output? Answer withheld in this preview.
Questions about the upcoming pack? Email codepeek@brainer.one.
Tell us about the contents, price, or anything that makes the next step unclear.
GOOD TO KNOW
Beginner-to-intermediate JavaScript learners and hobby coders. If you know basic syntax and want to get better at following what code does, take a peek.
No. The snippets are fixed teaching examples with reviewed answers. This site displays them; it does not execute them or accept code from you.
No. Your selections stay only in this page’s memory and disappear when you reload. In the free starter set, guest progress stays in your browser. Optional private username/password accounts save practice across devices. Import guest progress only if you choose to in Account.
Not yet. The 45-puzzle pack is upcoming. There is no checkout or paid access on this site.
Three puzzles. Step-by-step explanations. No signup needed.