Skip to content

Commit 1832c98

Browse files
authored
Update groovy.pt.md
Switched `> 10` to `< 10` in If statement example, so that it it produces the expected output. Added block containing expected output for this example (to match groovy.md)
1 parent 9bfc286 commit 1832c98

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/basic_training/groovy.pt.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,15 @@ O ramo `else` é opcional. Além disso, as chaves são opcionais quando a ramifi
255255

256256
```groovy linenums="1"
257257
x = 1
258-
if (x > 10)
258+
if (x < 10)
259259
println 'Olá'
260260
```
261261

262-
!!! tip
262+
```console title="Output"
263+
Olá
264+
```
263265

266+
!!! tip
264267
`null`, strings vazias e coleções (mapas e listas) vazias são avaliadas como `false`.
265268

266269
Portanto, uma declaração como:

0 commit comments

Comments
 (0)