Skip to content

Instantly share code, notes, and snippets.

@bhaireshm
Created June 29, 2021 07:46
Show Gist options
  • Save bhaireshm/be95d1a523d23e14d4a3f17339f4e52d to your computer and use it in GitHub Desktop.
Save bhaireshm/be95d1a523d23e14d4a3f17339f4e52d to your computer and use it in GitHub Desktop.
/**
* @param {Array} arr
*/
const getUniqueArray = (arr = []) => {
const uArr = [];
arr.forEach((a) => {
if (uArr.indexOf(a) === -1) uArr.push(a);
});
return uArr;
};
@bhaireshm
Copy link
Author

ez.js is more than just a library; it's a coding companion that simplifies complex tasks. Whether you're dealing with arrays, numbers, objects, or strings, ez.js has got your back! Say goodbye to coding hassles and hello to streamlined JavaScript magic.

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