If, elseif and else are flow control methods. Please see the usage below.
See an example of if:
...
$i = 1
if ($i == 1)
console.printLine("i -> 1")
end
...
See an example of if and else:
...
$i = 2
if ($i == 1)
console.printLine("i -> 1")
else
console.printLine("else: ", $i)
end
...
See an example of if, elseif and else:
...
$i = 2
console.printLine($i, ":")
if ($i == 0)
console.printLine("i -> 0")
elseif ($i == 1)
console.printLine("i -> 1")
elseif ($i == 2)
console.printLine("i -> 2")
elseif ($i == 3)
console.printLine("i -> 3")
else
console.printLine("else: ", $i)
end
...
- Syntax
- Data types, variables and constants
- Flow control - if, elseif and else
- Flow control - switch, case and default
- Flow control - forTime, forCondition, for and forEach
- Flow control - exceptions
- Functions
- Lambda functions
- Classes
- Modules
- Built-in functions
- Built-in classes
- Operators
- Constants
- MinitScript, see README.md
- MinitScript - How to build, see README-BuildingHowTo.md
- MinitScript - How to use, see README-Tools.md
- The Mindty Kollektiv Discord Server