We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab7b646 commit acf62b0Copy full SHA for acf62b0
1 file changed
1-js/05-data-types/10-destructuring-assignment/6-max-salary/_js.view/solution.js
@@ -1,16 +1,14 @@
1
function topSalary(salaries) {
2
3
- let max = 0;
+ let maxSalary = 0;
4
let maxName = null;
5
6
for(const [name, salary] of Object.entries(salaries)) {
7
if (max < salary) {
8
- max = salary;
+ maxSalary = salary;
9
maxName = name;
10
}
11
12
13
return maxName;
14
-}
15
-
16
+}
0 commit comments