摘要: 先不说一大堆乱七八糟的话,直接上代码,然后再解释 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <input type="text" id="username"> <input 阅读全文
posted @ 2019-12-01 20:35 好多坨屎 阅读(275) 评论(0) 推荐(0)
摘要: let arr = [1,2,3] let newArr = arr.map((item, i, arr) => { //item:遍历数组的每一项,i:数组当前项的下标,arr原数组 console.log(`item:${item}, i:${i}, arr:${arr}`) return it 阅读全文
posted @ 2019-12-01 18:19 好多坨屎 阅读(319) 评论(0) 推荐(0)