Learn JavaScript

Lesson 8 of 9 · if, switch and Loops

Module 4 · if, switch and Loops

Cheat Sheet: if, switch and Loops on One Page

ProReading

This page is the module on one screen, for the moment you need a rule fast. That moment comes in a code review, before an interview, or halfway through a judged problem. It adds nothing new. Every line comes from lessons 01 to 06, and each table names the lesson that explains it.

Checking what this lesson needs for you…

What is inside Cheat Sheet: if, switch and Loops on One Page

  1. Every statement, and how often its parts run
  2. The switch rules
  3. break, continue and labels
  4. What a condition sees
  5. Which loop: the flowchart and the chart
  6. Nested loops and their cost
  7. The off-by-one gallery
  8. The bug gallery in one line each
  9. Two programs that use the page

Module test

Ten questions on this module. Pass at 70%, and you can take it as many times as you like.

Take the module test