could anyone explain to me what is this function doing and how does it work? I'm a beginner and I don't get it.
It is from Eloquent JavaScript.
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);