map、filter、find、reduce、slice和splice用法
map、filter、find、reduce、slice和splice用法
const emojis = [‘✨’, ‘????’, ‘????’]
emojis.map(x => x + ‘✨’)
emojis.filter(x => x !== ‘????’)
emojis.find(x => x !== ‘????’)
emojis.reduce((acc, cur) => acc + ‘...
原创
2019-12-11 15:43:34 ·
467 阅读 ·
0 评论