Need Help. Somethings not right

Tell us what’s happening:
IDK what i am missing but it will not pass?

Your code so far

const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2];
  // change code below this line
  const squaredIntegers = realNumberArray.filter((item) => (item === Math.floor(item))).map((item) => (item + item))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:

You are not squaring the numbers, you are just doubling the number. For example, squaring 4 should result in 16 not 8 as your code does.

Also, remember that you should only square the positive integers.

1 Like