Booleans #

At its most basic level, a computer is a series of on and off switches, a set of 0s and 1s that flip back and forth to, well, compute things.

The concept of using binary values to represent information (0 and 1, true and false) is so fundamental to computation that Javascript, along with most other programming languages, has a dedicated type to these values, referred to as a boolean.

Creating a boolean value #

Boolean values can be created by assigning a value of true or false to a variable.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy