en.javascript.info/1-js/04-object-basics/01-object/8-multiply-numeric/task.md
Milo Silva 73550e58ac
Update 'properties' to 'property values'
The task asks to multiply numeric object 'properties', however the term 'object properties' include both the 'property keys' of the object as well as the 'property values' of the object. It is clear the intention of the task is to change property values. 
This change improves clarity of the task description.
2020-09-27 11:08:51 +02:00

33 lines
532 B
Markdown

importance: 3
---
# Multiply numeric property values by 2
Create a function `multiplyNumeric(obj)` that multiplies all numeric property values of `obj` by `2`.
For instance:
```js
// before the call
let menu = {
width: 200,
height: 300,
title: "My menu"
};
multiplyNumeric(menu);
// after the call
menu = {
width: 400,
height: 600,
title: "My menu"
};
```
Please note that `multiplyNumeric` does not need to return anything. It should modify the object in-place.
P.S. Use `typeof` to check for a number here.