What is the difference between assigning an anonymous arrow function to a variable (here constant):
const consumeError = (error)=> {
console.error(`Aborted, reason: ${error}`);
};
And creating a named function:
function consumeError2(error) {
console.error(`Aborted, reason: ${error}`);
}
I am don't see any difference in behavior. Are there any hidden implications regarding performance, memory leaks, coding style and so on?