Coding Interview Prep: Hashing in JavaScript