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 expectedUsers = 1000; var usersByDay = [812, 1360, 657, 1247]; // Drawing the traffic graph muffin.plot(usersByDay, expectedUsers); for (var i = 0; i &lt;= usersByDay.length - 1; i++) { console.log(usersByDay[i]); } // Calculating the average traffic value var averageUsers = 0; console.log('Average traffic: ' + averageUsers); if (averageUsers &gt; expectedUsers) { console.log('Traffic is amazing. Keep up the good work!'); } else { console.log('Traffic is so-so. You need to try harder!'); }</p>
3 <p>var expectedUsers = 1000; var usersByDay = [812, 1360, 657, 1247]; // Drawing the traffic graph muffin.plot(usersByDay, expectedUsers); for (var i = 0; i &lt;= usersByDay.length - 1; i++) { console.log(usersByDay[i]); } // Calculating the average traffic value var averageUsers = 0; console.log('Average traffic: ' + averageUsers); if (averageUsers &gt; expectedUsers) { console.log('Traffic is amazing. Keep up the good work!'); } else { console.log('Traffic is so-so. You need to try harder!'); }</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>Before the loop, add a variable totalUsers with a zero value.</li>
6 <ol><li>Before the loop, add a variable totalUsers with a zero value.</li>
7 <li>Inside the loop, remove console log and increase the value of the variable totalUsers by usersByDay[i].</li>
7 <li>Inside the loop, remove console log and increase the value of the variable totalUsers by usersByDay[i].</li>
8 <li>Inside the loop, log the variable totalUsers in the console.</li>
8 <li>Inside the loop, log the variable totalUsers in the console.</li>
9 </ol>
9 </ol>