Data Structures and Algorithms — Hash Tables
Hash tables store key-value pairs for fast lookups and insertions. They use a hashing function to map keys to specific locations in memory, making operations efficient on average.
let map = new Map();
map.set('name', 'Alice');
map.set('age', 25);
console.log(map.get('name')); // Output: Alice