Skip to content

Commit 84c5416

Browse files
committed
Add explanation of ternary operator
1 parent b4d0cd0 commit 84c5416

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ There are two ways to express `if`...`else` statement
124124
)
125125
```
126126

127+
### Ternary operator
128+
129+
```cpp
130+
condition ? m : n
131+
```
132+
133+
```WebAssembly
134+
(select
135+
(get_local $m)
136+
(get_local $n)
137+
(get_local $condition)
138+
)
139+
```
140+
127141
### Blocks of code
128142

129143
- `block`

0 commit comments

Comments
 (0)