1 parent 3634ed0 commit 19efb17Copy full SHA for 19efb17
1 file changed
content/posts/odin-guide.md
@@ -118,6 +118,14 @@ for i := 0; i < 10; i += 1 do foo()
118
119
## Ternary Operator
120
121
+In Odin there are 3 types of ternary operator syntaxes:
122
+
123
+```odin
124
+foo = condition ? x : y // runtime ternary
125
+foo = x if condition else y // runtime ternary
126
+foo = x when condition else y // compile time ternary
127
+```
128
129
## References
130
131
## Memory
0 commit comments