Added Range Operators in Swift

This commit is contained in:
Saksham Shrey authored and GitHub committed 2024-02-26 12:39:35 +05:30
1 parent 3c8d65772f
commit 6ef8b02645
1 file changed
+9 -9
+9 -9
View File
@@ -427,12 +427,12 @@ if weather == "sunny" {
"B" != "b" // true
```
-`<` less than
-`>` greater than
-`<=` less than or equal to
-`>=` greater than or equal to
-`==` is equal to
-`!=` is not equal to {.style-round cols-2}
-`<` less than <br>
-`>` greater than <br>
-`<=` less than or equal to <br>
-`>=` greater than or equal to <br>
-`==` is equal to <br>
-`!=` is not equal to
@@ -444,9 +444,9 @@ a..<b // numbers between a and b (including a but excluding b)
...b // numbers till b (including b)
```
-`a...b` Closed Range
-`a..<b` Half-Open Range
-`...b` One-Sided Range {.style-round cols-2}
-`a...b` Closed Range <br>
-`a..<b` Half-Open Range <br>
-`...b` One-Sided Range
### Ternary conditional operator