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
22
33---
44
5- # Multiply numeric properties by 2
5+ # Multiplica as propriedades numéricas por 2
66
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 ` .
88
9- For instance :
9+ Por exemplo :
1010
1111``` js
12- // before the call
12+ // antes da chamada
1313let menu = {
1414 width: 200 ,
1515 height: 300 ,
16- title: " My menu"
16+ title: " O meu menu"
1717};
1818
1919multiplyNumeric (menu);
2020
21- // after the call
21+ // depois da chamada
2222menu = {
2323 width: 400 ,
2424 height: 600 ,
25- title: " My menu"
25+ title: " O meu menu"
2626};
2727```
2828
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.
3330
31+ P.S. Use ` typeof ` aqui para verificar se é um número.
You can’t perform that action at this time.
0 commit comments