5 XP challenge

Count Back from the End

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Return the item distance places from the end, or fallback if that distance is invalid. values has 0 to 30 integers from -100 to 100; distance is 0 to 32; fallback is -100 to 100.

Examples

InputReturn
values = [4,8,9], distance = 1, fallback = 09
values = [4,8,9], distance = 2, fallback = 08

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.