#javascript’s Maps For Better Performance
▻https://hackernoon.com/javascripts-maps-for-better-performance-bbebb987c997?source=rss----3a814
A concrete example showcasing the performance of JavaScript Maps.This article is not intended to explore the API of the Map object in details. If you’re looking for such a source, please check out MDN.In general, the Map data structure is useful when we want to retrieve/add/delete values through a set of unique keys.One of the characteristics that make JavaScript Map data structure unique compared to its implementation in other languages, is the fact that it remembers the insertion order of its keys.In this article, we will take a close look at what makes this specific feature very useful and why you should use Maps over other data structures in some cases. To do so, we will look at a concrete example by building a shopping basket.Problem: Building Shopping BasketInitially, we have a list (...)