Last active
April 12, 2021 09:01
-
-
Save daviddamilola/5e99da275d34291648c32e204c2a95ce to your computer and use it in GitHub Desktop.
remove duplicates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getUniqueItemsFromArray = (array=[]) => { | |
return Array.from(new Set(array)).length() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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🎉