Skip to content

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

var a = [1, 1, 2];

[... new Set(a)]
See also  PHP code snippet - How to redirect back to admin page if user is not authenticated in laravel based on the guard?

Leave a Reply

Your email address will not be published. Required fields are marked *

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