0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>In the body of the printWinners function:</p>
1
<p>In the body of the printWinners function:</p>
2
<ol><li>After declaring the variable message, add a check to make sure that the number of winners is greater than 1.</li>
2
<ol><li>After declaring the variable message, add a check to make sure that the number of winners is greater than 1.</li>
3
<li>If the condition is true, override the value of the variable message to 'The winners are '.</li>
3
<li>If the condition is true, override the value of the variable message to 'The winners are '.</li>
4
<li>At the beginning of the loop body, add a check to make sure that i is greater than or equal to 1.</li>
4
<li>At the beginning of the loop body, add a check to make sure that i is greater than or equal to 1.</li>
5
<li>If the condition is met, add ', ' string to message (that way a comma will be added between all the names if there are more than one).</li>
5
<li>If the condition is met, add ', ' string to message (that way a comma will be added between all the names if there are more than one).</li>
6
<li>Remove console log for arrays cats and tops at the end of the program.</li>
6
<li>Remove console log for arrays cats and tops at the end of the program.</li>
7
</ol>
7
</ol>