I\'m looking for an elegant way of determining which element has the highest occurrence (mode) in a JavaScript array.
For example, in
[\'pear\', \'a
var array = [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17], c = {}, // counters s = []; // sortable array for (var i=0; i