Locating words in 2d arrays, a simple JS script