Tell us what’s happening:
the previous two problem before this i solved took me long time to understand inline functions,anonymous function,passing function as argument to other function but was able to understand them 80%.
i dont know how to proceed this problem
should i use for loop to iterate through elements of ‘arr’ and verify if they are positive integer ?
Your code so far
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
// change code below this line
const squaredIntegers = arr.filter(arr.);
// change code above this line
return squaredIntegers;
};
// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-higher-order-arrow-functions