Reasons to prefer Map over Object in JavaScript
A map is one of the most frequently used data structures. It keeps key-value pairs that can easily be accessed by their keys.
const map = {};
map['key1'] = 'value1';
map['key2'] = 'value2';
map['key3'] = 'value3';
// check if map contains key
i...
rahulism.hashnode.dev3 min read