Please enable JavaScript to use CodeHS

AP Computer Science Principles in JavaScript

Lesson 7.5 Iterating Over an Array

Description

In this lesson, students will be able to get the length of an array and loop through an array so they can use arrays in problems involving random numbers and JavaScript graphics.


Objective

Students will be able to:

  • Use the length of an array and a for loop to loop through the elements in an array
  • Loop over an array to filter or print certain elements based on tested criteria
  • Using iteration on arrays for problems involving randomness and graphics