Skip to content

Instantly share code, notes, and snippets.

@daviddamilola
Last active April 12, 2021 09:01
Show Gist options
  • Save daviddamilola/5e99da275d34291648c32e204c2a95ce to your computer and use it in GitHub Desktop.
Save daviddamilola/5e99da275d34291648c32e204c2a95ce to your computer and use it in GitHub Desktop.
remove duplicates
export const getUniqueItemsFromArray = (array=[]) => {
return Array.from(new Set(array)).length()
}
@daviddamilola
Copy link
Author

many thanks for taking the time to give feedback @meekg33k , the counting solution is an eye opener for me and thinking of pros and cons to any approach too.... looking forward to next Friday🎉

@daviddamilola
Copy link
Author

Woah, very efficient. Good!

thanks @mejtfk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment