Skip to content

TypeScript code snippet – How to get unique elements from an array ?

var a = [1, 1, 2];

[... new Set(a)]
See also  Array destructuring in JavaScript

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.