hash(word) {
    let hash = 0;
    for (let charIndex = 0; charIndex < word.length; charIndex += 1) {
      hash += word.charCodeAt(charIndex) * (this.base ** charIndex);
    }

    return hash;
  }
Function that creates hash representation of the word.

Time complexity: O(word.length).

@assumption: This version of the function  doesn't use modulo operator.
Thus it may produce number overflows by generating numbers that are
bigger than Number.MAX_SAFE_INTEGER. This function is mentioned here
for simplicity and LEARNING reasons.

@param {string} word - String that needs to be hashed.
@return {number}