Skip to content

Commit 315096d

Browse files
authored
Update task.md
1 parent 6c72ebe commit 315096d

File tree

1 file changed

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

1 file changed

+8
-8
lines changed

1-js/02-first-steps/14-function-basics/2-rewrite-function-question-or/task.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ importance: 4
22

33
---
44

5-
# Rewrite the function using '?' or '||'
5+
# Reescreva a função usando '?' ou '||'
66

7-
The following function returns `true` if the parameter `age` is greater than `18`.
7+
A função a seguir retorna `true` se o parâmetro `age` é maior que `18`.
88

9-
Otherwise it asks for a confirmation and returns its result.
9+
Caso contrário, pede por uma confirmação e retorna seu resultado.
1010

1111
```js
1212
function checkAge(age) {
1313
if (age > 18) {
1414
return true;
1515
} else {
16-
return confirm('Do you have your parents permission to access this page?');
16+
return confirm('Você tem permissão de seus pais para acessar esta página?');
1717
}
1818
}
1919
```
2020

21-
Rewrite it, to perform the same, but without `if`, in a single line.
21+
Reescreva, to perform the same, mas sem `if`, em uma única linha.
2222

23-
Make two variants of `checkAge`:
23+
Faça duas variantes de `checkAge`:
2424

25-
1. Using a question mark operator `?`
26-
2. Using OR `||`
25+
1. Usando um operador de interrogação `?`
26+
2. Usando OR `||`

0 commit comments

Comments
 (0)