Open the console in CodePen or in your browser's Developer Tools.
body {
padding: 20px;
}
console.clear();
let items = ['a', 1, 'a', 'beachfront', 'avenue'];
let unique = [...new Set(items)];
console.log(items); // original array
console.log(unique); // duplicates removed
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.