skip to Main Content

JavaScript filter method

function evensOnly(arr) { // your code here const arrEven = arr.filter((arr) => { if (arr % 2 === 0) { return arr; } console.log(arrEven); }); } // test console.log(evensOnly([3, 6, 8, 2])); /// [6, 8, 2] I got error that…

VIEW QUESTION
Back To Top
Search