Skip to content

Commit efdf7bf

Browse files
committed
Ajustes finais
1 parent 1b4c6df commit efdf7bf

File tree

1 file changed

+5
-5
lines changed
  • 1-js/02-first-steps/12-nullish-coalescing-operator

1 file changed

+5
-5
lines changed

1-js/02-first-steps/12-nullish-coalescing-operator/article.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ alert(x); // 2
106106
107107
- O operador de coalescência nula `??` disponibiliza uma sintaxe curta para obter um valor "definido" em uma lista.
108108
109-
É usado para atribuir valores a variáveis:
109+
É usado para atribuir valores a variáveis:
110110
111-
```js
112-
// grava altura=100, se altura é null ou undefined
113-
altura = altura ?? 100;
114-
```
111+
```js
112+
// grava altura=100, se altura é null ou undefined
113+
altura = altura ?? 100;
114+
```
115115
116116
- O operador `??` possui uma precedência muito baixa, um pouco maior que `?` e `=`.
117117
- É proibido usá-lo com `||` ou `&&` sem parênteses explícitos.

0 commit comments

Comments
 (0)