how to remove duplcated values sin map javascirpt code example Example: deduplicate array javascript function uniq(a) { return Array.from(new Set(a)); }