Before we write our own loops let’s take a moment to develop an appreciation for loops. The best way to do that is by showing you how cumbersome it would be if a repeated task required you to type out the same code every single time.
Create the variable
vacationSpots, and assign its value to an array of three strings naming places you’d like to visit.
console.log() each item in
vacationSpots. Since we don’t know loops yet, we have to
console.log() each element in the array separately.
Nice work! Now imagine that the vacation list had 100 places on it— logging each array element to the console by hand would be a tedious task! In the next exercise, we will learn how to make things more efficient with