Everything seems right, my only issue is that my array has spaces on the edges of the array. What’s the best way to fix this.
This is what I have…
const squareList = arr => {
// Only change code below this line
let positiveInts = arr.filter(int => int > 0);
let sqArr = positiveInts.map(int => Math.pow(int, 2))
return sqArr;
// Only change code above this line
};
My result is [ 23.04, 25, 9 ]
It should be [23.04, 25, 9]