📅  最后修改于: 2022-03-11 15:02:50.008000             🧑  作者: Mango
var sandwiches = ['turkey', 'ham', 'turkey', 'tuna', 'pb&j', 'ham', 'turkey', 'tuna'];
var deduped = Array.from(new Set(sandwiches));
// Logs ["turkey", "ham", "tuna", "pb&j"]
console.log(deduped);