← HALL

Mutable Default Argument

EASY
+100 XP REWARD ⏱ Limit: 5m
// MISSION BRIEFING //

ANOMALY DESCRIPTION

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.

SPECIFICATION SUITE

Append to existing
Input: 'cyber', ['code']
Expected: ['code', 'cyber']
Append to default
Input: 'glitch', undefined
Expected: ['glitch']
Null argument safety [PROTECTED TEST]
Evaluation logic hidden to prevent hardcoding.

RADAR HINTS

Hint #1 (Click to decrypt)

Handle null in addition to undefined for the items parameter.

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

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