How to remove duplicates from array in JavaScript

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

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