HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <ul><li>script.js</li>
1 <ul><li>script.js</li>
2 </ul><p>JavaScript</p>
2 </ul><p>JavaScript</p>
3 <p>var sum = 0; for (var i = 1; i &lt;= 10; i++) { console.log('i: ' + i); // Add a check here console.log('sum: ' + sum); }</p>
3 <p>var sum = 0; for (var i = 1; i &lt;= 10; i++) { console.log('i: ' + i); // Add a check here console.log('sum: ' + sum); }</p>
4 <p>Thanks! We’ll fix everything at once!</p>
4 <p>Thanks! We’ll fix everything at once!</p>
5 <h2>Result</h2>
5 <h2>Result</h2>
6 <ol><li>Inside the loop, add a check to make sure that the counter is even (i % 2 === 0).</li>
6 <ol><li>Inside the loop, add a check to make sure that the counter is even (i % 2 === 0).</li>
7 <li>If the check is executed, increase the variable sum by 2.</li>
7 <li>If the check is executed, increase the variable sum by 2.</li>
8 <li>Inside the condition, after increasing the sum, log the 'even number' string in the console.</li>
8 <li>Inside the condition, after increasing the sum, log the 'even number' string in the console.</li>
9 <li>After the check is complete, add the else branch and increase the sum inside it by 1.</li>
9 <li>After the check is complete, add the else branch and increase the sum inside it by 1.</li>
10 <li>Inside the else, after increasing the sum, log the 'odd number' line in the console.</li>
10 <li>Inside the else, after increasing the sum, log the 'odd number' line in the console.</li>
11 </ol>
11 </ol>