DEV Community

Discussion on: Getting the frequency of an element in an array in JavaScript

Collapse
keogami profile image
keogami

Thats too hacky and non intuitive i.e. not readable. As a simple rule you must avoid being clever because readable code is always better than clever code 😊

Collapse
perelynsama profile image
Perelyn-sama Author

True, simple code is good code.