摘要: var ages = [32, 33, 16, 40]; ages= ages.filter(function checkAdult(obj) {//obj表示数组中的每个元素 return obj >= 18; });console.log(ages);//结果[32,33,40] 阅读全文
posted @ 2017-08-08 09:21 Ai-Long 阅读(164) 评论(0) 推荐(0)