数组的各种处理场景
1. Filter
基础定义: 菜鸟(https://www.runoob.com/jsref/jsref-filter.html),mdn(https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
用法示例: https://www.jianshu.com/p/b074d106bd07
筛选数组arr中所有大于4的元素并返回该数组
let arr = [1, 3, 5, 8]
let arrFilter = arr.filter(ele => ele > 4)
console.log(arrFilter) // [5, 8]