Stuck in 'Write Higher Order Arrow Functions'

Tell me what’s happening:
I got required o/p in my console, but here the error was like… ‘keyword function never used!’

Your code so far


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

const squareList = (arr) => {
  "use strict";
  function multiply(item){
	  return item * item;
  }
  const squaredIntegers = arr.filter(num => Number.isInteger(num) && num>0).map(multiply);
  // 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

You have declared the function here, instead you need to use an arrow function inside the map method without using function

The tests are checking if there is the keyword function anywhere in the code

1 Like

thank you so much!! more love <3

output accepted… thank you, once again, you saved my time, btw, test case had to be ’ function keyword should not be used!’, instead it was showing ‘function key word was not used!’ that the thing made me so confusing!

Yeah, the wording of some tests is strange - but it happens when the curriculum has been developed by several different volunteers