Variables and Types
These are primitive types in Frugurt, they can be assigned to variables.
Nah
Number
Bool
String
There are also Function
s and custom types
Nah
let x = nah;
print(x);
Number
let x = 7;
let y = 3;
print(x + y, x * y); // 10 21
Bool
let x = true;
let y = false;
print(x && y, x || y); // false true
String
let x = "hello";
let y = "world";
print(x <> ", " <> y); // hello, world
Function
let f = fn(x, y) {
return x + y;
};
print(f(1, 2)); // 3
We will learn more about functions in the corresponding chapter.