1 files changed, 17 insertions(+), 1 deletions(-)
examples/basics/control.blight+17-1| ... | ... | @@ -1 +1,17 @@ |
| 1 | let x: bool = 1 * 3 + 2 / 2 == 4 + 2; | |
| 1 | let print = @raw("console.log"); | |
| 2 | ||
| 3 | let x: bool = true; | |
| 4 | ||
| 5 | if x { | |
| 6 | print("x is true!"); | |
| 7 | } | |
| 8 | ||
| 9 | let y: int = 3; | |
| 10 | ||
| 11 | if y == 1 { | |
| 12 | print("y is 1!"); | |
| 13 | } else if y == 2 { | |
| 14 | print("y is 2!"); | |
| 15 | } else { | |
| 16 | print("y is not 1 or 2!"); | |
| 17 | } |