View difference between Paste ID: svNmpzKp and R2fLqazA
SHOW: | | - or go back to the newest paste.
1-
function inArray(cells, str) {
1+
function inArray(arr, str) {
2-
  for (var cell in cells) {
2+
  for (var cell in arr) {
3-
    if (cell.toString() == str) {
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-
}
12+
13
14