You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/New Features/Ternary Expressions.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
sidebar_position: 1
3
3
---
4
4
Ternary expressions behave identical as to how they would in C. They introduce no new keywords.
5
-
```plutoshowLineNumbers title="Old Code"
5
+
```pluto title="Old Code"
6
6
local max
7
7
if a > b then
8
8
max = a
9
9
else
10
10
max = b
11
11
end
12
12
```
13
-
```plutoshowLineNumbers title="New Code"
13
+
```pluto title="New Code"
14
14
local max = a > b ? a : b
15
15
```
16
16
#### [Try It Yourself](https://pluto-lang.org/web/#code=local%20a%20%3D%206%0Alocal%20b%20%3D%209%0A%0Alocal%20max%20%3D%20a%20%3E%20b%20%3F%20a%20%3A%20b%0A%0Aprint(max))
0 commit comments