Javascript key-value store: understand some cool built-in Objects

· Pitayan · July 2, 2020, midnight
Summary
In this article, I’ll show you how to handle Javascript “key-value” data type with its special “Array”. # Can you use “Array” as a “key-value” store? Technically, No… An Array is used for storing ordered list of data. This means that the key to each of its value is actually a number(string number). let arr = [0, 1, 2] arr[0] // 0 arr[1] // 1 arr['2'] // 2 arr[2] === arr['2'] // true As we all know, Array is also an Object in Javascript. Even though assigning a new property to an Array made it ...
AUTHOR