File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
1-js/04-object-basics/01-object/8-multiply-numeric Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
- importance : 3
1
+ importância : 3
2
2
3
3
---
4
4
5
- # Multiply numeric properties by 2
5
+ # Multiplica as propriedades numéricas por 2
6
6
7
- Create a function ` multiplyNumeric(obj) ` that multiplies all numeric properties of ` obj ` by ` 2 ` .
7
+ Crie uma função ` multiplyNumeric(obj) ` que multiplique todas as propriedades numéricas de ` obj ` por ` 2 ` .
8
8
9
- For instance :
9
+ Por exemplo :
10
10
11
11
``` js
12
- // before the call
12
+ // antes da chamada
13
13
let menu = {
14
14
width: 200 ,
15
15
height: 300 ,
16
- title: " My menu"
16
+ title: " O meu menu"
17
17
};
18
18
19
19
multiplyNumeric (menu);
20
20
21
- // after the call
21
+ // depois da chamada
22
22
menu = {
23
23
width: 400 ,
24
24
height: 600 ,
25
- title: " My menu"
25
+ title: " O meu menu"
26
26
};
27
27
```
28
28
29
- Please note that ` multiplyNumeric ` does not need to return anything. It should modify the object in-place.
30
-
31
- P.S. Use ` typeof ` to check for a number here.
32
-
29
+ Por favor, note que ` multiplyNumeric ` não precisa de retornar nada. Deve modificar o próprio objecto.
33
30
31
+ P.S. Use ` typeof ` aqui para verificar se é um número.
You can’t perform that action at this time.
0 commit comments