Tell us what’s happening:
would there be a possibility for this code to work as a solution too?
i am not entirely sure how to make it work, but i think it should
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(integer => Number.isInteger(arr) && arr > 0)).map( squared => Math.pow(integer,2));
// change code above this line
return squaredIntegers;
};
// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:69.0) Gecko/20100101 Firefox/69.0.
Hey thank you for the prompt reply, i have tried that code and it is not working still, SyntaxError: missing ) after argument list that is what I get. So i am not sure where its wrong.
Hey thanks for the patience and the help, for some reason it was not working yesterday. I spent a few more hours trying to do it like that and today it just worked.
I am not really sure what is the difference but it does work.