Write a function topSalary(salaries). In the object salaries each key is a name and each value is a salary.
Return the name of the person with the highest salary. If the object is empty, return null.
topSalary({ John: 100, Pete: 300, Mary: 250 })Returns 'Pete'
topSalary({})Returns null
topSalary({ Ann: 0 })Returns 'Ann'
topSalary({ John: 100, Pete: 300, Mary: 250 })'Pete'topSalary({})nulltopSalary({ Ann: 0 })'Ann'Hidden tests run on Submit.