Created
March 28, 2017 01:21
-
-
Save jovey-zheng/b1edc5cb4301bf49ed0811a48fb3dd87 to your computer and use it in GitHub Desktop.
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 isRepeat(arr){ | |
var hash = {}; | |
for (var item of arr) { | |
if (hash[item]) { | |
return true; | |
} | |
hash[item] = false; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment