Unique Values with Set

Sets
πŸ‘¨β€πŸ’Ό We collect tags from multiple sources and need to remove duplicates.
🐨 Open
index.ts
and use the provided tags fixture:
  1. Create uniqueTags as a Set from tags (size should be 4)
  2. Create hasTypeScript by checking whether the set has 'typescript' (expected true)
  3. Create tagList by converting the set back into an array β€” preserve insertion order: ['typescript', 'data', 'arrays', 'objects']
  4. Export uniqueTags, hasTypeScript, and tagList
πŸ“œ MDN - Set

Please set the playground first

Loading "Unique Values with Set"
Loading "Unique Values with Set"
Login to get access to the exclusive discord channel.
Loading Discord Posts