首页 > TAG信息列表 > Exuberant

Array.prototype.map()

Array.prototype.map() 遍历加工,不改变原数组,与foreach相似,但优于foreach 模仿foreach的用法 const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; words.map(item => { console.log(i