@thebarefootdev-logo

Return a list of non-unique entries in a primitive (number) array in JavaScript

A fun little challenge, try to do it as little code as possible!

Just a fun little challenge I made for myself when figuring out a wider solution for something I am working on. I thought id put it out there for others. Since it’s javaScript there is far more than one way to do it!

Ignoring good code style and other things like optimization, I have, (so far) come up with two solutions myself, which appear to work, but I’d love to see your solutions, paste them in the comments. Try and make them shorter than the shortest here or in the comments!

Rules are: Just keep it short as possible, don’t need to worry about optimization or anything!

Have fun!

Leave a comment

Enter your email below to receive updates.

Navigation

About

Rumblings and grumblings, musings and shootings on all things software(ish)