Hashing search algorithm in JavaScript
Please check javascript code.