← HALL

String Number Addition Concatenation

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

ANOMALY DESCRIPTION

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.

SPECIFICATION SUITE

String and integer
Input: '4', 5
Expected: 9
Two string numbers
Input: '10', '20'
Expected: 30
Float strings [PROTECTED TEST]
Evaluation logic hidden to prevent hardcoding.

RADAR HINTS

Hint #1 (Click to decrypt)

Wrap the parameters in Number() before applying the addition operator.

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

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