Skip to content

Commit 6975a01

Browse files
committed
fix undefined to pass test
1 parent 97ef862 commit 6975a01

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

1-js/05-data-types/10-destructuring-assignment/6-max-salary/_js.view/solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function topSalary(salaries) {
44
let maxName = null;
55

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

0 commit comments

Comments
 (0)