Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 446 Bytes

array_unique.md

File metadata and controls

13 lines (9 loc) · 446 Bytes

Get unique values from array

var list = [1, 2, 3, 4, 5, 5];
var unique = [...new Set(list)];
  • var list - declare test array to get unique values from
  • new Set(list) - store unique values from passed list array (docs)
  • var unique - will contain final list with unique values only

link_youtube: https://youtu.be/e_wG3iT6Dlo