Please enable JavaScript to use CodeHS

Introduction to Computer Science in JavaScript (Bulldog)

Description

In this lesson, students learn about lists/arrays and how to access an element in an array with an index so they can create ordered collections of items and use them in their programs.

Objective

Students will be able to:

  • Define an array
  • Access certain elements of an array by using an index
Description

In this lesson, students continue to work with array indexing to get and assign array values so they can incorporate arrays/lists into their programs and handle data more efficiently.

Objective

Students will be able to:

  • Use indexing to call and assign items in an array
Description

In this lesson, students 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
  • Loop over an array to filter or print certain elements based on tested criteria
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
Description

In this lesson, students learn and use another method on a list, indexOf in order to find elements in lists within their programs.

Objective

Students will be able to:

  • Use the indexOf method to find the index of a particular element in an array.
Description

In this lesson, students will learn how to use the splice and remove methods to remove an element from an array to add more functionality to their programs.

Objective

Students will be able to:

  • Use the splice and remove methods to remove an element from an array.
Description

In this lesson, students will learn how to create objects and store key/value pairs of data.

Objective

Students will be able to…

  • Understand what objects are and how they store data.
  • Understand the difference between an object’s key and value.
  • Create an empty object and assign it a key/value pair.
Description

In this lesson, students will learn additional techniques to initialize an object with data and assign new data.

Objective

Students will be able to…

  • Initialize an object with key/value data
  • Assign values to objects using Object Property Notation
  • Understand more examples of how to assign and use keys
Description

In this lesson, students will learn how to use a for…in loop to iterate over all of the keys in an object.

Objective

Students will be able to…

  • Iterate through the keys of an object
  • Better understand the difference between keys and values in an object
Description

In this lesson, students will reflect on when to use an object as their data structure.

Objective

Students will be able to…

  • Better understand when to choose an object as their data structure.
  • How to check if a key is in an object.
Description

In this lesson, students are introduced to sets as a way to store an unordered, unique list of items.

Objective

Students will be able to…

  • Understand when to choose a set as the appropriate data structure.
  • Create a new set.
  • Populate a set, check if an element is in a set, and remove an item from a set.
Description

In this lesson, students learn how to store data in a table-like format using grids.

Objective

Students will be able to…

  • Conceptually understand and visualize how grids store data.
  • Create, populate, and retrieve data from grids.
Description

In this lesson, students will learn how to iterate through every element stored in a grid.

Objective

Students will be able to…

  • Iterate through all of the elements stored in a grid.
Description

In this lesson, students will practice looping through grids.

Objective

Students will be able to…

  • Confidently loop through the elements in a grid and output a single row.
Description

In this lesson, students will develop a digital watercolor program and complete a culminating Data Structures quiz.

Objective

Students will be able to…

  • Demonstrate their proficiency with different JavaScript data structures.
  • Recall prior knowledge about JavaScript graphics and mouse events.