Variables
age := 23 // int
name := 'Alice' // string
is_adult := age > 21 // bool
println(age_str) // 23
println(name) // Alice
println(is_adult) // truemut age := 20 // declare the mutable variable age and assign it to the value 20.
println(age) // 20
age = 21 // assign a new value to age
println(age) // 21fn main() {
age = 20
println(age)
}Naming Rules
Valid Names
Invalid Names
Last updated
Was this helpful?