en.javascript.info/1-js/4-data-structures/5-object-for-in/2-sum-salaries/solution.md
2015-01-11 01:54:57 +03:00

202 B

//+ run
"use strict";

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

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

alert(sum);