Unique Values with Set
Sets
π¨βπΌ We collect tags from multiple sources and need to remove duplicates.
π¨ Open
and use the provided
tags fixture:- Create
uniqueTagsas aSetfromtags(size should be4) - Create
hasTypeScriptby checking whether the set has'typescript'(expectedtrue) - Create
tagListby converting the set back into an array β preserve insertion order:['typescript', 'data', 'arrays', 'objects'] - Export
uniqueTags,hasTypeScript, andtagList
π MDN - Set


