en.javascript.info/1-js/4-data-structures/5-object-for-in/2-sum-salaries/solution.md
2015-03-10 12:36:58 +03:00

197 B

//+ run
"use strict";

var salaries = {
  "Вася": 100,
  "Петя": 300,
  "Даша": 250
};

var sum = 0;
for (var name in salaries) {
  sum += salaries[name];
}

alert( sum );