JavaScript - Loops

This is one of the most critical and difficult lessons in the entire series. Not because its long and sophisticated — it’s not — but because we’re introducing for loops and how they are a big part of what programming is all about: repeating a set of instructions over and over again, efficiently. We will what we made in the previous challenge, a slice of cheese, and use a loop to place five randomly sized holes in randomly selected places on the cheese.

“How can you loop over an object in JavaScript without using jQuery?”
sample interview question

Ready to learn about loops? Great! Let’s get started by watching a video tutorial.

JavaScript Tutorial - for Loop

Wow. Looping, or iterating, over things in a programatic fashion is pretty great, and one of the most common operations you’ll find yourself performing in your web development adventures. Let’s head over to Codecademy and learn a bit more about it by taking lessons 3 and 4 in the Loops section.

Codecademy: Loops

Mastery of loops is critical to your success as a developer, so play close attention and don’t skip anything. Don’t be afraid to google something if it doesn’t make sense or you want to know more about it.

By now, you should be thinking about how much time you could have saved in the last couple challenges if you had known about for loops before now. And you’ll just love how much smaller your code be when you make efficient use of loops. And when it comes to code, smaller is almost always better!

The following challenge features some more circle math, so if you haven’t already, take a couple minutes to refresh your circle math skills with the Khan Academy

What's next? Do the challenge!

0 Comments — Be the first!