View Problem

Perform different actions depending on a boolean condition (IF .. THEN .. ELSE)

Given a variable age, if the value is greater than 42 display "You are old", otherwise display "You are young"
ExpandDiskEdit
fantom
if (age > 42)
echo("You are old")
else
echo("You are young")
ExpandDiskEdit
fantom
echo((age > 42) ? "You are old" : "You are young")

Submit a new solution for fantom
There are 33 other solutions in additional languages (clojure, cpp, csharp, erlang ...)