Use Higher-Order Functions ~ Number.isInteger()

Tell us what’s happening:

What’s wrong with this code?
I know it has to do with the:
Number.isInteger(num)

Your code so far


const squareList = (arr) => {
// only change code below this line
return arr
.filter(num => (Number.isInteger(num) && num > 0)) 
.map(int => Math.pow(int, 2));
// only change code above this line
};

// test your code
const squaredIntegers = squareList([-3, 4.8, 5, 3, -3.2]);
console.log(squaredIntegers);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0.

Challenge: Use Higher-Order Functions map, filter, or reduce to Solve a Complex Problem

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem

To start with i belive that nothing after the return statement will run so currently the function is taking an array and returning that array and ending the function

what do the failing test(s) say?

EvalError: call to eval() blocked by CSP

The code passes in both Firefox and Chrome for me. But I would still suggest you try Chrome and see if it passes for you.

The code passed as soon as I used Chrome.

Thanks to everyone for your help solving this!