Stumpted, Writeing Higher Order Arrow Functions

Tell us what’s happening:
In this challenge, I decided to use filter and map functions to solve.
The filter function checks for any element greater than zero, and is an integer,
While map, squares anything that passed the filter function.

The issue is happening somewhere in the filter function where any element
being passed…passes, while nothing else is being passed to the map function
and nothing is being returned at the function.

Your code so far

const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2];
const squareList = (arr) => {
  "use strict";
   // change code below this line
  const squaredIntegers = arr
    .filter((item) => {
     item > 0 && parseInt(item)
}).map((item) => { 
  item => item * item
// test your code
  return squaredIntegers;
// test your code
const squaredIntegers = squareList(realNumberArray);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0.

Link to the challenge:

 && parseInt(item)

parseInt is used for converting strings, but it also works with numbers. What it will do though, is the same as Math.floor(), gets rid of the decimal part and for example parseInt(8.4) yields 8. And you know, any number over 0 is coerced to true

Now, there are many techniques to determine if a number is an integer but in Javascript you have it easy:

//> false