Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function in_array (needle, haystack, argStrict) {
  2.     var key = '', strict = !!argStrict;
  3.  
  4.     if (strict) {
  5.         for (key in haystack) {
  6.             if (haystack[key] === needle) {
  7.                 return true;
  8.             }
  9.         }
  10.     } else {
  11.         for (key in haystack) {
  12.             if (haystack[key] == needle) {
  13.                 return true;
  14.             }
  15.         }
  16.     }
  17.  
  18.     return false;
  19. }
  20.  
  21. var a_attack    = [838, 839, 840, 841, 842, 843, 844, 845];
  22. var a_expire    = [846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856];
  23.  
  24. if(in_array(id_item,$.merge(a_attack, a_expire))){
  25.     alert('TEEETAS!');
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement