Basic intro to answer the question, "What's a Loop?"
If there's a set of data, (we'll use an array for this example, but it doesn't have to be,) and you want to perform the same manipulation to every piece in that set of data, you can use something called a loop.
Loops have some complex syntax to get used to at first, but once you have it, they're extremely useful. I used loops in many of my bonfire solutions.
You don't need to understand everything here - just know that loops exist when you need to traverse a set of data and they can cut down on the amount of code you need to write.
❤️ Support for this channel comes from our friends at Scrimba – the coding platform that's reinvented interactive learning: https://scrimba.com/freecodecamp
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.