10 XP challenge
Find the First Exact Match
easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve
TaskYour mission
Return the first zero-based index where numbers equals target, or -1 if target is absent. numbers has 0 to 30 integers from -100 to 100; target is in that range.
Examples
| Input | Return |
|---|---|
numbers = [4,2,4], target = 4 | 0 |
numbers = [1,2,3], target = 2 | 1 |
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.