Aug 19, 2020

Stack Overflow, Commented (001): Get all non-unique values in an array

Might make this a series. Might not.

Recently, I was looking for ways (via JavaScript) to get all items in an array that appeared more than once.

Not too long ago, I was confused about map(), filter() and reduce(). Sometimes, I still get confused – with reduce in particular...

So, here's a shoutout to past me, who would have appreciated this, and anybody else out there who wants to look at an attempt at a commented breakdown.

Thank you to Christian Landgren for your solution.

For those on a smaller device, this might look a tad better for you in comparison to the embed below.

What's your story?
What do you need help with?
Let's chat.

This site is built with Next.js, using a WordPress-powered headless CMS, and is hosted on Linode. Github hosts the source code. Analytics provided by Cabin.

Β© 2020 Emily Dela Cruz.

Hi πŸ‘‹ – I'm working on a newsletter. It'll cover psychology, books, music...among other topics. Here's content I find interesting to discuss: The Link Shelf, Records. Sound up your alley? Sign up below. At most it'll be a monthly email.

I'll only send emails when each newsletter is posted.
No emails being shared. No spam.