Hi everyBuddy,

I actually figured it out, but I want to know how you guys would solve this with different approaches.

The problem asks you to return a new array with only positive integers that are squared. So:

- Expected new array: [4, 42, 6]
- Expected output: [16, 1764, 36]

```
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;
// change code above this line
return squaredIntegers;
};
// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);
```

Hereâ€™s how I do it

```
// change code below this line
const filterdArr = arr.filter(num => num > 0 && (num % 2 === 0 || num % 2 === 1));
const squaredIntegers = filterdArr.map(num => num * num);
// change code above this line
```

I used .filter() to filter the positive integers first, then used .map() to return a new squared array.

I have 2 concerns:

- Is there another way to determine whether a number is integer?
- Can I solve this without using filter first? Or more sophisticated (maybe complicated), is there a way I can use .filter() as nested with .map(), so I donâ€™t need to declare
`filteredArr`

.

Thanks everyone!