Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. function hasOne(a,b) {
  2. var i = a.length;
  3. while (i--) {
  4. if (b.indexOf(a[i]) > -1) return true;
  5. }
  6. return false;
  7. };
  8.  
  9. hasOne([1,2,3], [4,5,6]);
Add Comment
Please, Sign In to add comment