CodePeek
Practice / ScopeBack to CodePeek

JavaScript const bindings: Constant, not frozen

Puzzle 12 of 15 · const bindings

Read a property update on an object declared with const. Predict whether the update succeeds and what the console log prints. Choose an output below, then check the explanation. No signup needed. Browse puzzles by topic →

Scope / const bindingsJavaScript
const player = { score: 1 };
player.score += 2;
console.log(player.score);

Predict the console output. Each line is a separate log.

What’s the output?

Choose the output

Starter puzzles 15