Please enable JavaScript to use CodeHS

AP Computer Science Principles in JavaScript

Basic Data Structures

Students learn about lists and arrays which are essential basic data structures that any program will use.

Lessons

7.1 Intro to Lists/Arrays

  • Intro to Lists/Arrays
  • Intro to Lists/Arrays Quiz
  • Making an Array
  • List of Places to Travel
  • List of Prime Numbers
  • +1 more

7.2 Indexing Into an Array

  • Indexing Into an Array
  • Indexing into an Array Quiz
  • Array Indexing Practice
  • Top Movies
  • Indexing Badge

7.3 Adding/Removing From an Array

  • Adding/Removing From an Array
  • Adding/Removing from an Array Quiz
  • Add/Remove From Array
  • Empty Array (Push/Pop)

7.4 Array Length and Looping Through Arrays

  • Array Length and Looping Through Arrays
  • Array Length and Looping Through Arrays Quiz
  • Print Shopping List
  • Print First Five Items
  • Sum Array
  • +8 more

7.5 Iterating Over an Array

  • Examples: Iterating Over an Array
  • Iterating Over an Array Quiz
  • Coin Flips
  • Many Crazy Balls
  • Coin Flip Fun: Number of Heads and Tails
  • +5 more

7.6 Finding an Element in a List

  • Finding an Element in a List
  • Finding an Element in a List Quiz
  • Array indexOf
  • Who is in Line?
  • Algorithm Efficiency

7.7 Removing an Element From an Array

  • Removing an Element From an Array
  • Removing an Element from an Array Quiz
  • Splice and Remove
  • Remove From Line
  • AP Practice: List Procedures

7.8 Simulation

  • Simulation
  • Gravity Simulation
  • Conway's Game of Life
  • Simulating a Coin Flip
  • Wolf Sheep Predation Simulation
  • +1 more

7.9 Basic Data Structures Quiz

  • Basic Data Structures Quiz

Courses that include this module