Why the Write Higher Order Arrow Functions Challenge is Misleading for Me

Tell us what’s happening:

I had to take a look at the solution, but my problem with this challenge is that the variable “num” was not detailed prior in the docs for this challenge. Even when I took a look at the MDN prior to the spoiler, I don’t remember anywhere in this challenge where I could directly reference the actual values within the array without using a loop. I wish this was placed in the code, instead of assuming the coder would know this variable existed, since then I could run filter() and map() against something and filtering using boolean logic. IDK, this one felt way different from the challenges prior.

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 = arr;
  // change code above this line
  return squaredIntegers;

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

Link to the challenge:

num is not a specific variable, it is just an arbitrary name

What is happening is that those methods take a callback function, and functions with arrow syntax are written like el => { do something } (but could totally be like function (el) { do something } and it works the same, it is just that the challenge teach about arrow functions) and pass one element of the array at a time in the callback function, and then do something depending on the value returned from the callback

num is not a specific variable name, here I used el and everything would work the same. It is just an arbitrary name for the function parameter.