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

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

代码示例6
const arr = ['pine', 'apple', 'pineapple', 'ball', 'roll'];
const longWords = arr.filter(item => item.length > 5);

console.log(longWords);   // ['pineapple']