es6的实用

72 阅读1分钟

数组的includes ->遍历数组内部数据; set可以去重

const set = new Set([1, 2, 3, 4, 4]);
[...set]
// [1, 2, 3, 4]

凑字数,凑紫薯,凑字数,凑紫薯,凑字数,凑紫薯,凑字数,凑紫薯