HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Improve the printWinners function:</p>
1 <p>Improve the printWinners function:</p>
2 <ol><li>After logging 'All cats rock!', end the function with return.</li>
2 <ol><li>After logging 'All cats rock!', end the function with return.</li>
3 <li>After the first condition, create variable message, which contains the line 'The winner is '.</li>
3 <li>After the first condition, create variable message, which contains the line 'The winner is '.</li>
4 <li>After the variable, write the for loop, which increases the counter i from 0 to the length of the array winners (not including this value) by one at each iteration.</li>
4 <li>After the variable, write the for loop, which increases the counter i from 0 to the length of the array winners (not including this value) by one at each iteration.</li>
5 <li>In the body of the loop, add the names of the winners message += winners[i].name.</li>
5 <li>In the body of the loop, add the names of the winners message += winners[i].name.</li>
6 <li>After the loop, use += to add the ' with the number of points: ' + points of the first player in the winners array string to the message.</li>
6 <li>After the loop, use += to add the ' with the number of points: ' + points of the first player in the winners array string to the message.</li>
7 <li>Log message in the console.</li>
7 <li>Log message in the console.</li>
8 </ol>
8 </ol>