Javascript


#1

CODE;

const animals = [‘Grizzly Bear’, ‘Sloth’, ‘Sea Lion’]; for (let i = 0; i < animals.length; i++){ console.log(animals[i]); };
OUPUT;
Grizzly Bear
Sloth
Sea Lion

I can’T UNDERSTAND IT TEEL ME HELP ME


#2

what is it you do not understand? The better you can indicate this, the more specific answer we can give you

the general explanation is that we create an array (animals), then we create a loop which gives us indexes, these indexes can be used to lookup values from the array


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.