Skip to content

Instantly share code, notes, and snippets.

@Jadedvi104
Created June 27, 2017 04:48
Show Gist options
  • Save Jadedvi104/cb7403bae9c19946c9995d4cdccbf9d1 to your computer and use it in GitHub Desktop.
Save Jadedvi104/cb7403bae9c19946c9995d4cdccbf9d1 to your computer and use it in GitHub Desktop.
var array1 = new Array("a","e","c","d","e","f");
for (var i = 0; i < array1.length; i++) {
array1 = array1.filter(function( item, index, inputArray ) {
return inputArray.indexOf(item) == index;
});
}
alert(array1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment