Run Tests on Chrome

Tell us what’s happening:
Nothing happens when i click on “Run Tests” :frowning:

Your code so far


const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];


const squareList = (arr) => arr.filter((i => i > 0 && Number.isInteger(i) == true));
const squaredIntegers = (arr2) => arr2.map(x => x * x);

// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-higher-order-arrow-functions/

usually this implies there is a syntax error.

Double check every line of code to see if makes sense …
I will do the same in the meantime and let u know if I notice anything.

Edit : found it. The console was reporting the error:

unknown: Duplicate declaration “squaredIntegers”
7 |
8 | // test your code

9 | const squaredIntegers = squareList(realNumberArray);
| ^
10 | console.log(squaredIntegers);

1 Like