Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const find = arr =>
- Object.entries(arr.reduce((acc, item) => ({...acc, [item]: (acc[item] || 0) + 1}), {}))
- .sort(([,a], [,b]) => b - a)[0][0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement