File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ This language is still currently experimental with many more features to come.
18
18
* [ Inheritance] ( examples/extends.ls ) .
19
19
* [ Functions] ( examples/func.ls ) .
20
20
* [ Variables] ( examples/variable.ls ) .
21
- * Conditionals.
21
+ * [ Conditionals] ( examples/conditionals.ls ) .
22
+ * Logical operators.
22
23
* Loops.
23
24
* Closures.
24
25
* [ Recursion] ( examples/recursion.ls ) .
Original file line number Diff line number Diff line change
1
+ var x = true ;
2
+
3
+ // Your typical if /else statement .
4
+ if (x ) {
5
+ print "x is true" ;
6
+ } else {
7
+ print "x is false" ;
8
+ }
9
+
10
+
11
+ var num = 10 ;
12
+
13
+ // If /else if statements can be chained together too !
14
+ if (num < 5 ) {
15
+ print "num is less than 5" ;
16
+ } else if (num < 8 ) {
17
+ print "num is less than 8" ;
18
+ } else if (num < 11 ) {
19
+ print "num is less than 11" ;
20
+ }
You can’t perform that action at this time.
0 commit comments