TypeScript code snippet – How to get unique elements from an array ? Subash Chandran 15th December 2021 Leave a Comment var a = [1, 1, 2]; [... new Set(a)] Curly hair, very fair, please share 🙂Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Related See also Array destructuring in JavaScript Snippets, TypeScript how to get unique names in array typescript, how to get unique names oin array typescript, typescript unique array Change font size A Decrease font size. A Reset font size. A Increase font size.