Boolean

A Boolean represents a value that can only be in one of two states: true or false.

let x be true

Usage

Booleans are useful for control flow.

let enabled be true

if enabled then
  print "it's enabled!"
otherwise
  print "it's disabled!"

Logical operators (and, or, not) can be used to operate on boolean values.

let sweet be true
let sour be false
print sweet and not sour # true

Constructor

Creates a new Boolean with the given value.

let a be new Boolean with just false

Methods

Returns "true" or "false".

Returns the boolean in JSON format.

print "hello world"