if statement

Syntax
IfStatement :
   if Expression: NEWLINE
   INDENT
   (Statement | Expression)+
   DEDENT
   (else : NEWLINE
   INDENT
   (Statement | Expression)+
   DEDENT)?

Example:

contract Foo:

    pub fn bar(val: u256) -> u256:
        if val > 5:
            return 1
        else:
            return 2

The if statement is used for conditional execution.