30 Days Of JavaScript

Day 4: Loops

Wrap up

Looping is one of the hardest things to get your head around when learning to code. It took me several attempts to start to even feel vaguely comfortable with the concept. The best way to practice is to write lots of loops!

In the playground below practice a few ways of looping:

Challenge

You know how to create arrays, you know how to create objects, no let's loop over an array of objects.

Here is a stripped down version of our laptop specs from earlier. Use two types of loops (for and for of) to loop through, printing the name and storage size of each laptop.

Time for a quiz

It good to test your knowledge just after learning something new, it solidifies the connections in your mind and identifies any areas that you should go back over.

The Pro version of 30 Days of JavaScript comes with a 10 question multiple choice quiz at the end of each day, if you want to take these quizzes (and get a host of other Pro features) then consider:

Joining Pro today

Outline

Go Pro?

If you upgraded to pro, sign in here

  • About
  • Blog
  • Privacy
Looking to email me? You can get me on my first name at allthecode.co