Tell us what’s happening:
I am moving along through the course fine when periodically I hit a problem like this that uses really challenging functions (in combination) that have only been seen once (maybe twice) at a point that I cannot recall. So I have to use the spoiler to get through the lesson
It feels like freecodecamp expects the user to have a second nature of of use for the functions, but from a resource other than freecodecamp. Do you have any suggestions on how to memorize or creatively build a library of functions that are most useful in a daily developer’s life?
Thank you for any suggestions.
- Dad-with-little-time-and-must-be-extremely-efficient
Your code so far
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
// change code below this line
const squaredIntegers = arr.filter( (num) => num > 0 && num % parseInt(num) === 0 ).map( (num) => Math.pow(num, 2) );
return squaredIntegers;
// 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_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-higher-order-arrow-functions