10 XP challenge
Remove One Item by Position
easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve
TaskYour mission
Return numbers with the item at zero-based position removed. If position is negative or at least the list length, return all original items. numbers has 0 to 30 integers from -100 to 100; position is -5 to 35.
Examples
| Input | Return |
|---|---|
numbers = [4,4,4], position = 1answer: [] → [4] → [4,4]. The result is [4,4]. | [4,4] |
numbers = [1,2,3], position = 0answer: [] → [2] → [2,3]. The result is [2,3]. | [2,3] |
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.