somoene help me please ! why my code isn’t working??
i’m doing the ES6: Write Higher Order Arrow Functions i’m stuck with this code for a long time i need your help
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.map((one)=>
if (one % 1 === 0 && one > 0){
one * one;
}
// change code above this line
return squaredIntegers;
});
// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);