Skip to content

Commit acf62b0

Browse files
committedJan 21, 2021
minor fixes
1 parent ab7b646 commit acf62b0

File tree

1 file changed

+3
-5
lines changed
  • 1-js/05-data-types/10-destructuring-assignment/6-max-salary/_js.view

1 file changed

+3
-5
lines changed
 
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
function topSalary(salaries) {
22

3-
let max = 0;
3+
let maxSalary = 0;
44
let maxName = null;
55

66
for(const [name, salary] of Object.entries(salaries)) {
77
if (max < salary) {
8-
max = salary;
8+
maxSalary = salary;
99
maxName = name;
1010
}
1111
}
1212

1313
return maxName;
14-
}
15-
16-
14+
}

0 commit comments

Comments
 (0)