get size() {

        /*
         * Because the `entries()` generator already implements the correct
         * traversal algorithm, use that here instead of duplicating the
         * algorithm.
         * 
         * The first step is to create a new iterator by calling `entries()`.
         */
        const iterator = this.entries();

        /*
         * The `count` variable stores the number of entries we see and is
         * incremented inside of a loop later on.
         */
        let count = 0;
        
        /*
         * Get the first entry from the iterator. Each entry has two properties:
         * `value`, containing the value from the hash map, and `done`, a
         * a Boolean value that is `true` when there are no more entries.
         */
        let entry = iterator.next();

        // Continue the loop as long as there are more entries
        while (!entry.done) {

            // Increment the count to reflect the last entry
            count++;

            // Get the entry from the iterator and repeat the loop
            entry = iterator.next();
        }

        /*
         * Once the loop exits, the `count` variable contains the number of
         * entries in the iterator so return that value.
         */
        return count;
    }
Returns the number of key-value pairs in the hash map.
@returns {int} The number of key-value pairs in the hash map.