Local Variables

Variables represent the object as a memorable name.

let a = "test"

Variables can also be overridden by ommiting the let statement.

a = 1

New in 0.10: Ommiting the let will also create a variable if not present making let completely optional.

Examples

let some_integer = 1;
let name = "RocketLang";
let array = [1, 2, 3, 4, 5];
let some_boolean = true;

Also expressions can be used

let another_int = (10 / 2) * 5 + 30;
let an_array = [1 + 1, 2 * 2, 3];

Edit this page on GitHub