Leetcode Basic Problems In Javascript Object Sorting In Javascript