KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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.
Tags (comma-separated)
Save Edits
Cancel