var list = [1, 2, 3, 4, 5, 5];
var unique = [...new Set(list)];
var list
- declare test array to get unique values fromnew Set(list)
- store unique values from passedlist
array (docs)var unique
- will contain final list with unique values only
link_youtube: https://youtu.be/e_wG3iT6Dlo