Remove duplicates from an Array of String
Posted on October 9, 2021
This is my preferred way:
let chars = ['A', 'B', 'A', 'C', 'B'];
let uniqueChars = [...new Set(chars)];
// ['A', 'B', 'C']
Posted on October 9, 2021
This is my preferred way:
let chars = ['A', 'B', 'A', 'C', 'B'];
let uniqueChars = [...new Set(chars)];
// ['A', 'B', 'C']