Please enable JavaScript to use CodeHS

AP Computer Science A (Mocha)

Lesson 2.6 Booleans

Description

How do we write code that tells us whether a user is logged in to our program? Booleans are the solution to these questions. A boolean refers to a value that is true or false. Those are the only values of a boolean expression, and these are useful if we want to check if something is true or false.


Objective

Students will be able to…

  • Create boolean variables to represent meaningful yes/no values
  • Print out the value of a boolean variable