Store magic numbers

store -1 returned by indexOf(wordToSearch) as a constant to make it
more readable