html bug-102-9

bug-102-9: The Mysterious Case of the Missing Semicolons

Welcome, bug-hunters! We've got a real puzzler here: a function that's supposed to print out all numbers from 1 to 10, but somehow it's only printing numbers 5, 6, 7, 8, and 9. What's going on?

			var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
			for (var i = 0; i < numbers.length; i++) {
				console.log(numbers[i]);
				if (numbers[i] == 4) break;
			}
		

Hmm, it looks like our culprit is... break logic 101-1.