← HALL

Lost Class Method This Binding

MEDIUM
+250 XP REWARD ⏱ Limit: 10m
// MISSION BRIEFING //

ANOMALY DESCRIPTION

A GameTimer class passes its increment method into an interval runner, but 'this' becomes undefined at runtime. Refactor the method to an arrow function property or bind it in the constructor.

SPECIFICATION SUITE

Tick returns incremented value
Input: new GameTimer().tick()
Expected: 1
Detached tick invocation [PROTECTED TEST]
Evaluation logic hidden to prevent hardcoding.

RADAR HINTS

Hint #1 (Click to decrypt)

Bind this.tick in the constructor: this.tick = this.tick.bind(this).

solution.js UTF-8 • JAVASCRIPT
STATIC ANALYSIS CONSOLE Ready for dispatch

Press "VERIFY & SUBMIT" or Ctrl+Enter to evaluate your patch.