10 XP challenge
Take the First Few Items
easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve
TaskYour mission
Return the first count items from numbers. If count is larger than the list length, return all items. count is 0 to 40; numbers contains 0 to 30 integers from -100 to 100.
Examples
| Input | Return |
|---|---|
numbers = [8,2,6], count = 2answer: [] → [8] → [8,2]. The result is [8,2]. | [8,2] |
numbers = [8,2], count = 0 | [] |
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.