0

I am very new at JS and coding. please forgive my ignorance. i am trying to figure out the following piece of code. how does the argument(3,2,1) get assigned to the input to the arrow function? I do not see any explicit assignment.

function noisy(f) {
  return (...args) => {
    console.log("calling with", args);
    let result = f(...args);
    console.log("called with", args, ", returned", result);
    return result;
  };
}
noisy(Math.min)(3, 2, 1);

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.