← Back to Question List
JavaScript Code Walkthrough #20
Breaking Out of a Loop
📄 Code
Read carefully — what does this print?1let result = 0;2for (let i = 0; i < 10; i++) {3 if (i === 4) break;4 result += i;5}6console.log(result);