5 XP challenge
First Item or Default
very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve
TaskYour mission
Return the first value, or fallback when values is empty. values has 0 to 30 integers from -100 to 100; fallback is in the same range.
Examples
| Input | Return |
|---|---|
values = [0,8], fallback = 9 | 0 |
values = [], fallback = 7 | 7 |
Your code
Write your answer inside Solution, then use return to send it back.
Ln 1, Col 1
JavaScript
Try examples runs the public examples. Check my code checks your full answer and saves your completion.