Variables
Declare variables with let
:
let name = "Alice"
let age = 14
let is_coder = true
print name # Output: Alice
Math Operations
Use standard math expressions:
let total = 10 * (2 + 3)
print total # Output: 50
Lists
Lists are ordered groups of values:
let fruits = ["apple", "banana", "mango"]
print fruits[1] # Output: banana
Conditionals
Control flow using if
and otherwise
:
let age = 14
if age >= 13 {
print "Teen"
}
otherwise {
print "Child"
}
Functions
Define reusable blocks of code:
fun greet name {
print "Hello " + name
}
greet "Alice"