
Ulyssa Sneed
6,025 Pointsim about to give up smh
const temperatures = [100, 90, 99, 80, 70, 65, 30, 10];
for ( let i = 100; i > temperatures.length; i++ ) {
console.log(temperatures[i]);
}

Ulyssa Sneed
6,025 Pointstotally worked!! Thanks
1 Answer

Peter Vann
Treehouse Moderator 31,439 PointsHi Ulyssa!
I think the challenge wording threw you off a bit.
This passes the task:
const temperatures = [100, 90, 99, 80, 70, 65, 30, 10];
for ( let i = 0; i < temperatures.length; i++ ) {
console.log(temperatures[i]);
}
100 is the value at the first ordinal position in the array (temperatures[0]) and 10 is in the last/7th ordinal position in the array (temperatures[7]).
So you want i to go from 0 to 7 in the loop iterations (temperatures.length is 8 in this case, which is why you want to use <.
I hope that helps.
Stay safe and happy coding!

Peter Vann
Treehouse Moderator 31,439 PointsMy bad...
I just saw the follow-up comments right after I answered!?! LOL
Ikey Mikey
Full Stack JavaScript Techdegree Student 3,218 PointsIkey Mikey
Full Stack JavaScript Techdegree Student 3,218 PointsWhoa you got an infinite loop try i= 0 and i < temperature.length should work