Skip to main content
added 136 characters in body; edited tags
Source Link
michael.zech
  • 4.5k
  • 8
  • 33
  • 56
Commonmark migration
Source Link

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.

 

It's got to have the following methods:

 
  • Creating a new key-value pair : setItem(key: string, item: T)

    Creating a new key-value pair : setItem(key: string, item: T)

     
  • Retrieving values : getItem(key: string)

    Retrieving values : getItem(key: string)

     
  • Remove all items : clear()

    Remove all items : clear()

     
  • Display all key-value items : printMap() "

    Display all key-value items : printMap() "

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.

 

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() "

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.

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() "

quoted problem description
Source Link
t3chb0t
  • 44.3k
  • 9
  • 84
  • 190

" 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() "

" 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.

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() "

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.

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() "
edited title
Link
michael.zech
  • 4.5k
  • 8
  • 33
  • 56
Loading
Source Link
michael.zech
  • 4.5k
  • 8
  • 33
  • 56
Loading