Maps & Sets Keyed Collections in JavaScript
🟢 Beginner Level | JavaScript Core Syntax
📖 Definition
Map is an ordered dictionary supporting arbitrary key types. Set stores unique primitive or object reference values.
âš¡ Code Example
const uniqueNums = new Set([1, 2, 2, 3]); // Set(3) {1, 2, 3}
const userRoles = new Map();
userRoles.set(user, "Admin");
🧠Navigation
← 01. Object Literals & Static Methods | Module Hub | 03. Date & RegExp Pattern Matching →