en.javascript.info/1-js/3-object-basics/1-object/4-sum-object/task.md
Ilya Kantor 3f5f2cac8b work
2016-07-22 20:47:41 +03:00

320 B

importance: 5


Sum object properties

We have an object storing salaries of our team:

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.