This is not a valid syntax, i think something has been messed up ^^
That said, consider to break down the problem: you are asked to return an array of the square values only of positive integer values. You could follow these steps:
Filter out only the valid values, which means filter out anything that does not respect the specs ( positive AND integer)
Map over the values of that new array and return the square of those values.
Since filter returns a new array you can concat the two functions: something like const newArr = originalArr.filter(...).map(...)
Consider those methods as functions that iterates upon each element of the array they are called against.
Something like
oldArray.map(x => console.log(x))
In the above example every item in the old array will be logged into the console.
const newArray= oldArray.filter(x => x < 20)
Here every item in the old array will be checked against the expression x<20: if it returns true the item will be inserted into the new array, if it return false the item will be discarded;
Now, if you would log only the items < 20, you could operate as follows:
oldArray.filter(x => x < 20).map( y => console.log(y));
Thank you for your help. I’ve just solved this challenge. I had a look at MDN (Mozilla Developer Network) and found a method called Number.isInteger() which tests for whole numbers in the array.