Currently expanding my knowledge in JavaScript and came across this puzzling scenario. The output showing values of 6 and 10 has left me scratching my head. I need someone to break down the steps involved and shed some light on why these specific numbers are being displayed.
var apple = 1;
for (var apple = 0; apple < 10; apple = apple + 2) {
orange = orange + 1;
}
console.log(orange);
console.log(apple);