" Create a map using TypeScript Generics. The key is always a string.
Create a map using TypeScript Generics. The key is always a string.
The value can be a string or a number. It has to work with both types.
The value can be a string or a number. It has to work with both types.
It's got to have the following methods:
It's got to have the following methods:
Creating a new key-value pair : setItem(key: string, item: T)
Retrieving values : getItem(key: string)
Remove all items : clear()
Display all key-value items : printMap() "
- Creating a new key-value pair : setItem(key: string, item: T)
- Retrieving values : getItem(key: string)
- Remove all items : clear()
- Display all key-value items : printMap() "