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 usersByDay = [4, 2, 1, 3]; console.log(usersByDay); var currentIndex = 0; for (var j = currentIndex + 1; j <= usersByDay.length - 1; j++) { console.log(usersByDay[j]); }</p>
3
<p>var usersByDay = [4, 2, 1, 3]; console.log(usersByDay); var currentIndex = 0; for (var j = currentIndex + 1; j <= usersByDay.length - 1; j++) { console.log(usersByDay[j]); }</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>After the variable currentIndex, add a variable minValue with the value usersByDay[currentIndex].</li>
6
<ol><li>After the variable currentIndex, add a variable minValue with the value usersByDay[currentIndex].</li>
7
<li>Then in the loop, delete console log and add condition usersByDay[j] < minValue.</li>
7
<li>Then in the loop, delete console log and add condition usersByDay[j] < minValue.</li>
8
<li>When the condition is met, assign variable minValue value<em>of the j-th</em>element of the array.</li>
8
<li>When the condition is met, assign variable minValue value<em>of the j-th</em>element of the array.</li>
9
<li>And in the same place log the following message in the console: 'New minimum element: ' + minValue.</li>
9
<li>And in the same place log the following message in the console: 'New minimum element: ' + minValue.</li>
10
<li>After the loop, log this message in the console: 'Minimum element: ' + minValue.</li>
10
<li>After the loop, log this message in the console: 'Minimum element: ' + minValue.</li>
11
</ol>
11
</ol>