I'm learning for loops in JS and am trying to learn how to console.log the first and last element in an array on one iteration, then console.log the second and second to last elements, etc.

here's what I have tried:

```
for (let i=0; i<myArray.length; i++){
        console.log(myArray[i]);
        console.log(myArray[i-1];
}

```

This is printing elements from my array, but not in the correct order