April 2018
Beginner to intermediate
426 pages
10h 19m
English
We will also use an associative array (object) to represent our data structure as we did in the Dictionary class.
As usual, let's start with the structure of our class using the following code:
class HashTable { constructor(toStrFn = defaultToString) { this.toStrFn = toStrFn; this.table = {}; }}
Next, we need to add some methods into our class. We will implement three basic methods for every class: