-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Aria Ghora Prabono edited this page Oct 8, 2021
·
2 revisions
Welcome to the carrot wiki!
var_name: type = intial_value
Example:
hello: str = "Hello world"
x: int = 1 + 10
if x > 1:
println("block 1")
elif condition:
println("block 2")
elif condition:
println("block 3")
else
println("Else block")
end
numbers: list = [100, 200, 300]
iter numbers as num, @idx:
println("Item at index ", idx, " is ", num)
end
Index reference is optional.
iter numbers as num:
println("Item: ", num)
end