Proposed solution for: use higher order map, filer, reduce to solve a complex problem

Hello world! I think I make another simply solution for this challenge,

const squareList = arr => {
  // Only change code below this line
  return arr
  .filter(Number.isInteger)
  .filter(Number=> Number > 0)
  .map((num)=> num*num);
  
  // Only change code above this line
};

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

Hi @nspuigdemont!

Welcome to the forum!

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

I have also added the link for the challenge.

For future contributions, please include the challenge link.