// MISSION ARCHIVE //

CHALLENGE HALL

Select an anomaly, inspect the buggy logic, and submit your verified fix.

🎯 BUG OF THE DAY
MEDIUM
+250 XP

Lexicographical Array Sort Bug

A leaderboard ranking utility calls Array.prototype.sort() without arguments. Scores [100, 25, 5, 2000] end up sorted as [100, 2000, 25, 5]! Supply a proper comparison callback to sort in ascending numerical order.

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
MEDIUM
+250 XP

Async Loop Var Scope Closure

A timer dispatch function uses a loop with 'var' to capture indices into scheduled callback closures. Due to function-scoping of 'var', all callbacks capture the final loop value. Refactor to block-scoped 'let'.

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
MEDIUM
+250 XP

Shallow Copy Mutation Hazard

A player inventory cloner uses Object.assign to duplicate a profile. When the clone alters nested inventory items, the original profile is mutated! Implement a deep clone of the object.

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
MEDIUM
+250 XP

RegExp Global LastIndex State Trap

A security token validator reuses a RegExp object with the '/g' flag. Calling test() consecutively alternates between true and false due to persistent lastIndex state! Fix the regex to test cleanly without state leakage.

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
MEDIUM
+250 XP

Lost Class Method This Binding

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.

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
MEDIUM
+250 XP

Flatten Array Depth Recursion

A packet flattener only flattens 1 level deep using [].concat(...arr). Nested packets deeper than 1 level remain unflattened. Implement recursive flattening or use flat(Infinity).

⏱ 10m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →