Introduction:

Booleans are either true or false. They are a data type. They can be stored in [arrays]. When they are, they are stored WITHOUT "".


myArray = ["one", "two", 3, 4, true, "true", false, "false"];

where true and false are booleans, but "true" and "false" are strings:


  1. Comparators:
    • <
    • Is less than

    • <=
    • Is less than or equal to

    • >
    • Is greater than

    • >=
    • Is greater than or equal to

    • ==
    • Is the same as

    • ===
    • Is identical to

    • !=
    • Is not the same as

    • !==
    • Is not identical to

  2. Methods:
    • Boolean()
  3. Operators:
    • &&
    • Returns true if both sides of the argument are true (that is, different to "the same")

    • ||
    • Returns true if one side of the argument is true (that is, different to "the same")

    • !
    • Negates the result: