Please enable JavaScript to use CodeHS

AP Computer Science Principles: Cybersecurity

JavaScript Control Structures

Students learn how to use booleans and logical operators with control structures to make more advanced programs in JavaScript.

Lessons

4.1 Booleans

  • Booleans
  • Booleans Quiz
  • First Boolean
  • Do You Have a Cat?

4.2 Logical Operators

  • Logical Operators
  • Logical Operators Quiz
  • Light Switch
  • President
  • Wasting Time
  • +2 more

4.3 Comparison Operators

  • Comparison Operators
  • Comparison Operators Quiz
  • Voting Age
  • Grade Range
  • Rolling Dice
  • +2 more

4.4 If Statements

  • If Statements
  • If Statements Quiz
  • Negative Numbers
  • Great Names
  • Even and Odd
  • +5 more

4.5 Applying Conditionals - Password Validation

  • Password Protection
  • Password Checker
  • How Strong is your password?
  • Create a password
  • Ethics Moment: AI and Programming
  • +1 more

4.6 Key Events

  • Key Events
  • Key Events Quiz
  • Keyboard Square
  • Growing Circle

4.7 For Loops in JavaScript

  • Basic For Loop
  • For Loops Quiz
  • For Loop
  • Meme Text Generator
  • The Worm
  • +1 more

4.8 General For Loops

  • General For Loop
  • General For Loop Quiz
  • Countdown
  • Count By Twos
  • Count By Sevens
  • +3 more

4.9 For Loop Practice

  • For Loop Examples
  • For Loop Examples Quiz
  • For Loop Sum
  • Better Sum
  • Factorial
  • +1 more

4.10 Random Numbers

  • Random Numbers
  • Random Numbers Quiz
  • Rolling a Die
  • Flipping a Coin
  • Lots of Dice
  • +2 more

4.11 While Loops

  • While Loops
  • While Loops Quiz
  • While Loop Countdown
  • Inventory
  • Fibonacci
  • +2 more

4.12 Loop and a Half

  • Loop and a Half
  • Loop and a Half Quiz
  • Adding Up Numbers
  • Snake Eyes
  • Making a Stronger Password
  • +2 more

4.13 Javascript Control Structures Quiz

  • JavaScript Control Structures Quiz

Courses that include this module