Maps
Map
const timeUnits = new Map(
["second", 1],
["minute", 60],
["hour", 3600]
);
// Convert the Map back to array
Array.from(timeUnits);Weak Map
Last updated
const timeUnits = new Map(
["second", 1],
["minute", 60],
["hour", 3600]
);
// Convert the Map back to array
Array.from(timeUnits);Last updated
const wm1 = new WeakMap();