
var geyao = ['歌谣', '很帅', '很强']
geyao.forEach((currentValue, index, arr, thisValue) => {
console.log(currentValue, 'currentValue')
console.log(index, 'index')
console.log(arr, 'arr')
console.log(thisValue, 'thisValue')
})
小结:

//item 当前元素每一项的值
var geyao=['歌谣',"很帅","很强"]
var geyao1 = geyao.some((item)=>{
return item='歌谣'
})
console.log(geyao1,"geyao1")
注意:some() 不会对空数组进行检测。
注意:some() 不会改变原始数组。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
长按识别二维码并关注微信
更方便到期提醒、手机管理