摘要: 数组遍历 forEach 该方法等同于for循环,其没有返回值 结构:arr.forEach(回调函数,回调函数this的值) 第二个参数当回调函数是箭头函数时无效 用法: arr.forEach(function(item,index,arr){ // 里面的function是一个回调函数 // 阅读全文
posted @ 2023-02-06 16:14 snail-2018 阅读(151) 评论(0) 推荐(0)