Please enable JavaScript to use CodeHS

Tennessee Introduction to Computer Science

Lesson 6.5 For Loops in JavaScript

Description

In this lesson, students will learn in greater detail about for loops. For loops in Javascript are written and executed in the same manner as Karel exercises, except now students will explore modifying the initialization statement, test statement, and increment statements of the loops.


Objective

Students will be able to…

  • Create for loops in JavaScript
  • Explain the purpose of for loops
  • Utilize for loops to avoid typing out repeated code
  • Use the loop counter i inside the for loop code to do something different on each iteration