Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. function isRepeat(arr){
  2. var hash = {};
  3.  
  4. for (var item of arr) {
  5. if (hash[item]) {
  6. return true;
  7. }
  8. hash[item] = false;
  9. }
  10.  
  11. return false;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement