Basic for loop introduction question

Hello fellow coders, I am currently trying to wrap my head around something but it just doesn’t make sense to me. I am currently doing for loops on FCC and I can’t understand why in the below challenge ‘i’ has to be greater than 0 instead of 1 to return(push) the final number to the array ((i > 0), you can also write it as i >=1). The challenge is not difficult but what is on my mind is why does the code not execute ‘1’ as the final number in the loop if you - for example - put i > 1. The final number that is pushed is ‘3’. But 3 is still greater than 1. So why does it not push 1 as the final number in the array. I did think maybe because at the end of the loop it evaluates that 1 is not greater than 1 but the previous information that was covered in a previous lesson/challenge is that the “middle section” (condition) is already evaluated first and the loop will execute as long as the condition is true (and of course, if i = 3 then it should execute), right? Or am I missing something? The challenge example and my code is shown in the below example. If you put 1 in i > x then it just returns [9, 7, 5, 3].

Many Thanks

// Example
var ourArray = [];

for (var i = 10; i > 0; i -= 2) {

// Setup - My code
var myArray = [];

for(var i = 9; i > 1; i -= 2) {
// Only change code below this line.

As the for loop progresses, i will have the following values at the time the for loop condition (i > 1) is evaluated. Only if i > 1, will the value of i get pushed into myArray.


When i becomes 1, is 1 > 1? No, it is not, so it will not get pushed int myArray.

Ah I see, it appears I got too involved in what the code is doing and what is meant to actually happen when it executes. Thanks very much!