📜  数组过滤器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:27.103000             🧑  作者: Mango

代码示例6
const filtered = array.filter(item => {
    return item < 20;
});
// An example that will loop through an array
// and create a new array containing only items that
// are less than 20. If array is [13, 65, 101, 19],
// the returned array in filtered will be [13, 19]