Tell us what’s happening:
I remove return it still reports issues, maybe i’m still having dificulties understanding the syntax?
SyntaxError: unknown: Unexpected token (6:2)
4 | // change code below this line
5 | const squaredIntegers = number.filter((number)=>
6 | return number.isInteger(number)?number: false;
| ^
7 | let result = number.map(function(){
8 | return number;
9 | });
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 = number.filter((number)=>
return number.isInteger(number)?number: false;
let result = number.map(function(){
return number;
});
// 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_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-higher-order-arrow-functions/