All proxies failed. The site may block external access entirely.
1
say "Hello world"
say 5 + 5
print "print works too"
let age = 12
let name = "Cam"
change age by 1 # now 13
change age to 20 # now 20
10 # number
"hi" # text
true false # boolean
nothing # empty
[1, 2, 3] # list
{a: 1} # object
+ - * / % # math
== != > < >= <= # compare
and or not # logic
is is not # same as == !=
let who = "Cam"
say "Hi " + who
say upper("loud")
say length("hello") # 5
if score >= 50
say "pass"
else
say "fail"
end
for i = 1 to 5
say i
end
for i = 0 to 10 step 2
say i
end
repeat 3 times
say "beep"
end
let n = 0
while n < 3
change n by 1
end
let xs = [3, 1, 2]
say xs[0] # 3
push(xs, 9)
say sort(xs)
say length(xs)
for each x in xs
say x
end
let p = {name: "Cam", hp: 10}
say p.name
p.hp = 8
say p["hp"]
for each key in p
say key
end
to add a b
return a + b
end
say add(2, 3) # 5
try
say risky()
catch err
say "Oops: " + err
end
round floor ceil abs
sqrt(x) pow(a,b) random(1,6)
min(...) max(...)
length(x) range(5)
upper lower trim
text(x) number(s)
contains(list, item)
join(list, "-") split(s, ",")
push pop first last
reverse sort keys(obj)
has(obj, key) type(x)
pi
# Save with the Save button -
# scripts go to Files > Downloads
# and stay after you refresh.
# Double-click a script to open it.