File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
1-js/04-object-basics/01-object/8-multiply-numeric Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ let menu = {
77
88function multiplyNumeric ( obj ) {
99
10- /* your code */
10+ /* ваш код */
1111
1212}
1313
Original file line number Diff line number Diff line change 11describe ( "multiplyNumeric" , function ( ) {
2- it ( "multiplies all numeric properties by 2" , function ( ) {
2+ it ( "умножаем все числовые свойства на 2" , function ( ) {
33 let menu = {
44 width : 200 ,
55 height : 300 ,
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ importance: 3
22
33---
44
5- # Multiply numeric properties by 2
5+ # Умножаем все числовые свойства на 2
66
7- Create a function ` multiplyNumeric(obj) ` that multiplies all numeric properties of ` obj ` by ` 2 ` .
7+ Создайте функцию ` multiplyNumeric(obj) ` , которая умножает все числовые свойства объекта ` obj ` на ` 2 ` .
88
9- For instance :
9+ Например :
1010
1111``` js
12- // before the call
12+ // до вызова функции
1313let menu = {
1414 width: 200 ,
1515 height: 300 ,
@@ -18,16 +18,15 @@ let menu = {
1818
1919multiplyNumeric (menu);
2020
21- // after the call
21+ // после вызова функции
2222menu = {
2323 width: 400 ,
2424 height: 600 ,
2525 title: " My 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.
29+ Обратите внимание, что ` multiplyNumeric ` не нужно ничего возвращать. Следует напрямую изменять объект.
3230
31+ P.S. Используйте ` typeof ` для проверки, что значение свойства числовое.
3332
You can’t perform that action at this time.
0 commit comments