Please enable JavaScript to use CodeHS

Introduction to Computer Science in JavaScript (Bulldog)

Lesson 5.6 General For Loops

Description

In this lesson, students will explore in more detail how they can modify the initialization statement, test statement, and increment statement in a for loop.


Objective

Students will be able to…

  • Explain the three parts of the for loop (initialization statement, test statement, increment statement)
  • Create for loops that iterate differently than the basic for loop structure (ie count by twos or count backwards)

Activities

These are all the activities included in the lesson

5.6.1 General For Loop
5.6.2 General For Loop Quiz
5.6.3 Countdown
5.6.4 Count By Twos
5.6.5 Count By Sevens
5.6.6 Powers of Two