You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

370 B

Variables

If you are familiar with some other programming language, the way Sabre handles variables won't surprise you.

To declare a variable, the let keyword is used.

// variables.sb
fn main() {
    let x = 10
    let y = 5
    print(x + y)
}

Run this code using the sabre CLI:

$ sabre build variables.sb -o variables.js
$ node variables.js
15