Krenair

Untitled

Nov 20th, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function inArray(arr, str) {
  2.   for (var cell in arr) {
  3.     if (cell.toString().equals(str)) {
  4.       return true;
  5.     }
  6.   }
  7.   return false;
  8. }
  9.  
  10. function test() {
  11.   return inArray(["a1", "a"], "a"); //always returns false
  12. }
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment