Please enable JavaScript to use CodeHS

Video Game Design in JavaScript

Description

In this lesson, students will be introduced to arrays – how to create them and access their elements.

Objective

Students will be able to:

  • Define an array
  • Access elements of an array with an index
Description

In this lesson, students will learn how to add and remove elements at the end of an array using the push and pop methods.

Objective

Students will be able to:

  • Add elements at the end of an array using the push method
  • Remove elements from the end of an array using the pop method
Description

In this lesson, students will be able to get the length of an array and learn how to loop through an array so they can have more functionality with arrays in their programs.

Objective

Students will be able to:

  • Determine the length of an array using the length property
  • Use the length of an array and a for loop to loop through the elements in an array
  • Use a for…of loop to access each element in the array without using their indices.
Description

In this lesson, students apply the array iteration techniques that they learned in the last lesson to a variety of graphics applications.

Objective

Students will be able to:

  • Explain why arrays and array iteration are very useful when creating graphics programs with many graphics elements.
  • Use array iteration to control the graphics elements in a program.
Description

In this lesson, students learn about and put into practice a variety of array methods.

Objective

Students will be able to:

  • Explain the purpose of array methods
  • Read array method documentation
  • Implement searching, iterating, modifying, and converting array methods