I ran the code using different arrays missing a number between 1 - 9, but it kept returning -1.

```js
function findMissing(arrOfNumbers) {
  const integers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
  for (let index = 0; index < arrOfNumbers.length; index++) {
    if (integers[index] !== arrOfNumbers[index]) {
      return integers[index];
    }
    return -1;
  }
}

console.log(findMissing([0, 1, 3, 4, 6, 7, 8, 9])); //returns -1 instead of 5
```