-1

Do we have any colllections like map in nodejs. I would like to have a collection which can store my key value. Is there something like the same in nodejs

learnNcode
  • 149
  • 2
  • 4
  • 16

1 Answers1

3

Map was added to the ECMAScript standard library in ECMAScript 2015. This is not just "something like a map", this is a map.

Here is a question with an answer of mine that uses a Map: How to declare Hash.new(0) with 0 default value for counting objects in JavaScript?

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653