Utilizor
Contact Us

Boolean Values

True and False.

Boolean Values

A JavaScript Boolean represents one of two values: true or false.

Very often, in programming, you will need a data type that can only have one of two values, like:

  • YES / NO
  • ON / OFF
  • TRUE / FALSE

Example

let x = true;
let y = false;