Answers for "is arrow function a higher order function"

1

Write Higher Order Arrow Functions

const realNumberArray = [1, 3,-100, 6.7, 55 -47, 68 -3.8]

const squareList = (arr) => {
const squaredIntegers = arr.filter(num => Number.isInteger(num) && num > 0).map(x => x * x)
return squaredIntegers;
};

const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);
Posted by: Guest on July-05-2021

Browse Popular Code Answers by Language