194
rated 0 times
[
199]
[
5]
/ answers: 1 / hits: 173620
/ 15 Years ago, sat, june 27, 2009, 12:00:00
I'm looking for an elegant way of determining which element has the highest occurrence (mode) in a JavaScript array.
For example, in
['pear', 'apple', 'orange', 'apple']
the 'apple'
element is the most frequent one.
More From » mode