// MISSION ARCHIVE //

CHALLENGE HALL

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

🎯 BUG OF THE DAY
EASY
+100 XP

Off-By-One Array Bound

An array summation utility is throwing undefined errors or NaN because its loop boundary traverses past the final index. Fix the loop guard to properly sum array elements without indexing out of bounds.

⏱ 5m limit ⚡ 1 Solves JAVASCRIPT
HUNT BUG →
EASY
+100 XP

Strict Equality Type Coercion

A boolean status check function is inadvertently accepting string falsy values due to loose type comparison. Refactor the equality check so that only strict boolean true returns valid.

⏱ 5m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
EASY
+100 XP

Mutable Default Argument

A tag registration function allows caller overrides, but when items array is omitted, it fails to initialize a fresh array if null is supplied. Fix the function so items defaults to a clean array when not provided or null.

⏱ 5m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
EASY
+100 XP

Falsy Zero Numeric Check

A sensor calibration function checks if a value was provided using a truthy test. However, zero is a valid calibration point and gets rejected! Fix the guard to allow 0 as a valid number.

⏱ 5m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
EASY
+100 XP

String Number Addition Concatenation

A telemetry parser takes two coordinate inputs from an API and adds them. But one input is frequently a string, causing '4' + 5 to equal '45'! Ensure both inputs are parsed to numbers before adding.

⏱ 5m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →
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 →
HARD
+500 XP

Async ForEach Sequence Breakdown

A batch processor attempts to execute an async transform using array.forEach. But Array.prototype.forEach does not await promises! Refactor the method to use for...of or Promise.all.

⏱ 15m limit ⚡ 0 Solves JAVASCRIPT
HUNT BUG →