How to remove duplicates from array in JavaScript

Arrays
Last updated Mar 06, 2018
const items = ["Cars", "Cars", "Smartphone", "Cars", "Tablet"];

const uniqueItems = [...new Set(items)];
["Cars", "Smartphone", "Tablet"]