en.javascript.info/1-js/04-object-basics/01-object/5-sum-object/task.md
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

19 lines
No EOL
320 B
Markdown

importance: 5
---
# Sum object properties
We have an object storing salaries of our team:
```js
let salaries = {
John: 100,
Ann: 160,
Pete: 130
}
```
Write the code to sum all salaries and store in the variable `sum`. Should be `390` in the example above.
If `salaries` is empty, then the result must be `0`.