Julia Language if...else statement


Example

name = readline()
if startswith(name, "A")
    println("Your name begins with A.")
else
    println("Your name does not begin with A.")
end

Any expression, such as the if...else expression, can be put in statement position. This ignores its value but still executes the expression for its side effects.