I am trying to iterate through some characters and using a hashmap to keep track of characters seen already. I now have an object with characters and how many times they are encountered. I know I can get the values by doing:
Object.value(myObj).sort((a,b) => {return b - a})[0]
but I don't know how to use that highest value I have to relate back to the key it belongs to.