309 B
309 B
//+ run
"use strict";
var salaries = {
"Вася": 100,
"Петя": 300,
"Даша": 250
};
var max = 0;
var maxName = "";
for (var name in salaries) {
if (max < salaries[name]) {
max = salaries[name];
maxName = name;
}
}
alert( maxName || "нет сотрудников" );