← All tasks
🔍
Beginner

Off-by-One in a Loop

⏱ 3 min ⭐ 70 XP 🔁 3 attempts allowed

What you'll do

This function should print numbers 1 to 5 but it stops at 4.

Your task: Click the line that contains the bug. Select only the buggy line.

Scenario

This function should print numbers 1 to 5 but it stops at 4.

Ready to try it?

Create a free account and subscribe to take "Off-by-One in a Loop". Earn 70 XP and track your internship progress.

Already have an account? Sign in