Write a function `offOne(word, book)` which takes
a string called `word` and an array of strings called `book`.
It returns an array of all the `word`s in `book` of the same
length that are one letter different.

Examples:

```
offOne("cat", ["cat", "fat", "flat", "tar"]) => ["fat", "tar"]
offOne("will", ["wilt", "willow", "wail"]) => ["wilt", "wail"]

```

My function is currently:

```
function offOne(word, book) {
    var array = [];
    var count = 0;

    for (var i = 0; i < book.length; i++) {
        if (book.length === word.length) {
            if (word.indexOf(book[i]) !== -1) {
                count += 1;

                if (count === (book[i].length - 1)) {
                    array.push(book[i]);
                }
            }
        }
    }
    return array;
}

```

Does anyone know how to solve this? I got stuck for a while here.