Dear all,
Good afternoon,
I was trying to solve a challenge about arrays, and
sadly it is getting me too much time to solve it.
I should decide if i use a For Loop or a While Loop to iterate through the values in the temperatures array from the first item 100 to the last item 10. Besides inside the loop i should log the current value to the console.
var temperatures = [ 100, 90, 99, 80,70, 65, 30,10];
So far i was doing this
for ( var i = 100; i <= temperatures.length; i -=1){
console.log(temperatures[i]);
}
My biggest problem is related to the counter variable i -= 1,
as i see many different numbers i don´t know the amount exact which
decreases the value.
If somebody please can help me providing information or advises i will thank you so much ,
thank you all for your kind attention,
Best regards,
Ivonne