Map Lookups

Maps
πŸ‘¨β€πŸ’Ό We need fast lookups by user ID, and Map is perfect for that.
🐨 Open
index.ts
and use the provided users fixture:
  1. Create usersById as a Map keyed by user id (size should be 3)
  2. Create adminUser by reading id 'u1' from the map (expected name 'Ava')
  3. Create hasMissingUser by checking whether id 'u99' exists (expected false)
  4. Export usersById, adminUser, and hasMissingUser
πŸ“œ MDN - Map

Please set the playground first

Loading "Map Lookups"
Loading "Map Lookups"