Created verifyword.js

Functon used for word validation.