Skip to content

Instantly share code, notes, and snippets.

@romuleald
Created July 7, 2016 13:15
Show Gist options
  • Save romuleald/62abc6bd1e2f5bb96d23c6fedcfeb82e to your computer and use it in GitHub Desktop.
Save romuleald/62abc6bd1e2f5bb96d23c6fedcfeb82e to your computer and use it in GitHub Desktop.
Count unique item in array
var countItems = function (_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