📅  最后修改于: 2022-03-11 15:04:12.678000             🧑  作者: Mango
Instead of:
const set = new Set(['foo', 'bar', 'baz', 'foo']); // Set(3) { 'foo', 'bar', 'baz' }
const result = [...set] // []
Do:
const set = new Set(['foo', 'bar', 'baz', 'foo']); // Set(3) { 'foo', 'bar', 'baz' }
const result = Array.from(set) // ['foo', 'bar', 'baz']