JavaScript Loops Course

0
Join & Subscribe
Treehouse
Free Trial Available
English
1-2 hours worth of material
selfpaced

Overview

Loops are a way of repeating code -- they're handy for repetitive tasks. Loops are frequently used for actions that need to run a particular number of times or until a certain condition is true.

Syllabus

Simplify Repetitive Tasks with Loops

Learn how to save time and avoid code repetition with loops.

Chevron 9 steps
  • What is a Loop?

    2:36

  • The while Loop

    6:20

  • The do...while Loop

    3:18

  • Review Loops

    7 questions

  • instruction

    Add One to a Number with the Increment Operator (++)

  • Create a while Loop

    1 objective

  • Create a do...while loop

    1 objective

  • instruction

    Beware of Infinite Loops!

  • Review while, do...while, and Loop Conditions

    6 questions

Working with 'for' Loops

Learn about the most common type of loop in JavaScript, the 'for' loop.

Chevron 10 steps
  • The for Loop

    4:52

  • Create a for Loop

    1 objective

  • Dynamically Display HTML with a Loop

    6:52

  • instruction

    Exit a Loop

  • Terminate a Loop

    1 objective

  • The Refactor Challenge

    3:00

  • The Refactor Challenge – One Solution

    3:05

  • The Refactor Challenge – Duplicate Code

    6:01

  • Review for Loops and Exiting Loops

    6 questions

  • Refactor Code with a Loop

    1 objective

Taught by

Guil Hernandez