Please enable JavaScript to use CodeHS

AP Computer Science Principles: Cybersecurity

Lesson 4.11 While Loops

Description

In this lesson, students will explore while loops and JavaScript variables. This combines the ideas of creating variables, updating variables throughout a loop, and determining the correct ending condition.


Objective

Students will be able to:

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems