📜  在数组中查找偶数 javascript 代码示例

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

代码示例2
let getEvenNumbers = () => {
    let arr = [4,5,7,8,14,45,76];
        
    let the_evens = arr.filter(number => number % 2 == 0);
    document.write('Even Numbers: ' + the_evens);
}
    
getEvenNumbers();