Krenair

Untitled

Nov 20th, 2011
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function inArray(cells, str) {
  2.   for (var cell in cells) {
  3.     if (cell.toString() == 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.  
Advertisement
Add Comment
Please, Sign In to add comment