[javascript] Get the element with the highest occurrence in an array