Created
February 17, 2015 18:49
-
-
Save egulhan/c9d59edaef725dacc32a to your computer and use it in GitHub Desktop.
Unique function for Javascript (which returns result unlike Jquery unique function)
This file contains hidden or 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
| function unique(array){ | |
| return $.grep(array,function(el,index){ | |
| return index == $.inArray(el,array); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment