es5通过用集合语法,移除重复元素:
const removeText = arr => [...new Set(arr)];
removeText([42,42,'ee','ee',45,45,'qq']);
//=>[42,'ee',45,'qq'];
es5通过用集合语法,移除重复元素:
const removeText = arr => [...new Set(arr)];
removeText([42,42,'ee','ee',45,45,'qq']);
//=>[42,'ee',45,'qq'];