What is a loop?
A loop in JavaScript is a way of doing something over and over again. Today, you will be learning about for loops.
What's something you can loop over? Perhaps you can do something a number of times, but you can also loop over a set, or a collection of values.
That leads us to...
What is an array?
An array is an actual collection of values, like an array of names.
Let's say you didn't want to make a list of your favorite items by manually typing out the li elements all the time. Then, you can make an array of your favorite things, loop through them with a for loop, and automatically create that list.
An array typically looks like this:
var fruits = ["Banana", "Orange", "Apple", "Mango"];
Notice that you are setting a variable to a list of items that are comma separated. They are also enclosed by [], and the line ends in a semicolon.
Now...
I'd like you to go through the w3 schools page for "for loops", and for "arrays."
For Loops ArraysOnce you are done, see if you can use your skills of manipulating a page to dynamically make a list of favorite items. Consider using .innerHTML to edit a tag's html inside of it. Link to more info about .innerHTML.