Write Higher Order Arrow Functions yet again

Tell us what’s happening:
Code test is failing, telling me “loop should not be used.”

I see no loop.

I clearly missed the requirement that the number has to be greater than zero, but even when I just copy in the code from the solution (heresy!) I still get the no loop error.

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
  // use filter to check for integers, then map the results to square them.
  const squaredIntegers = arr.filter(num => num % 1 === 0).map(num => num * num);
  // 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-higher-order-arrow-functions/

Thanks for the super-fast response… can I suggest that the testing code should ignore stuff that’s commented out? Thanks again!