Skip to main content

Primitives

Primitive data types are used to describe the smallest elements of data in an program.

Nil

knot
const empty = nil;
knot
const empty = nil;

Boolean

knot
const truthy = true;
const falsy = false;
knot
const truthy = true;
const falsy = false;

Integer

knot
const integer = 10;
knot
const integer = 10;

Float

knot
const float = 1.5;
knot
const float = 1.5;

String

knot
const string = "foo";
knot
const string = "foo";