We can use Array.from and Set to remove duplicates from an array. Here is the sample code:

var arrayWithDuplicates = [‘h’, ‘b’, ‘l’, ‘b’, ‘h’, ‘k’, ‘h’, ‘l’, ‘s’, ‘d’, ‘k’, ‘k’];

var uniqueArray = Array.from(new Set(arrayWithDuplicates));

console.log (uniqueArray);  // [“h”, “b”, “l”, “k”, “s”, “d”]