Conditional statements allow you to add a level of logic to your scripts. Using if and switch statements we can create reactions for when one or more conditions are met.


If statements are probably the most popular ways to add logic to a project. They allow you to set reasoning based on, if this, do this, else do this

if myNumber < 10 then
 put "That is to low"
else if myNumber > 10 then
 put "That is to high"
 put "That is correct"
end if


The swtich statement is executed line byline, starting from the top. If you do not include a break statement, it will continue evaluating each condition.

put "wet" into myWeather
 switch myWeather
 case warm
 put "Wear a short shirt, its warm outside"
 case wet
 put "take your umbrella, its raining"
 put "I don't know what you shoud wear"
 end switch

// the above switch statment will output: take your umbrella, its raining

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search