Tell us what’s happening:
The output is that arr is not defined, but if try to define the arr inside the function(as i am allowed to) i get the variable as double-assigned.
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((arr)=>arr>0 && arr % parseInt(arr)===0).map((arr)=>Math.pow(arr,2))
// change code above this line
return squaredIntegers;
};
// test your code
const squaredIntegers = squareList(arr);
console.log(squaredIntegers);