Skip to content

Commit 6c72ebe

Browse files
authored
Update solution.md
1 parent 97fa553 commit 6c72ebe

File tree

1 file changed

+5
-5
lines changed
  • 1-js/02-first-steps/14-function-basics/2-rewrite-function-question-or

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Using a question mark operator `'?'`:
1+
Usando operador de interrogação `'?'`:
22

33
```js
44
function checkAge(age) {
5-
return (age > 18) ? true : confirm('Did parents allow you?');
5+
return (age > 18) ? true : confirm('Seus pais permitiram?');
66
}
77
```
88

9-
Using OR `||` (the shortest variant):
9+
Usando OR `||` (A variante mais curta):
1010

1111
```js
1212
function checkAge(age) {
13-
return (age > 18) || confirm('Did parents allow you?');
13+
return (age > 18) || confirm('Seus pais permitiram?');
1414
}
1515
```
1616

17-
Note that the parentheses around `age > 18` are not required here. They exist for better readabilty.
17+
Note que os parêntesis em volta de `age > 18` não são obrigatórios aqui. Eles existem para melhor legibilidade.

0 commit comments

Comments
 (0)