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