← Back to Challenges / Challenge #5

Infinite Loop in Data Processing

★★★☆☆
📁 angular/angular 🔢 mno7890 Logic Error
★★★☆☆
Difficulty
+100 XP reward
DataProcessor.js.js | 8 lines
Original (Buggy) Read-only
1
2
3
4
5
6
7
8
function processItems(items) {
let index = 0;
while (index < items.length) {
console.log(items[index]);
// Missing: index++
}
return 'done';
}
Your Fix Editable
1
2
3
4
5
6
7
8
0 added 0 removed 0 changed
Click lines on the left to mark as buggy

Submit Your Fix

Lines marked: 0

Edit the code on the right panel above to fix the bugs. Changes are highlighted in real-time.

Removed   Changed   Added    Click lines on the left to mark buggy lines