let func = () => {}; console.log(func.name); // func
let func = () => foo(); func()
Uncaught ReferenceError: foo is not defined func @ test.js:1
All this time I've been using the full named function expressions over arrow functions just for the stack traces.
let doStuffCallback = () => {}; doStuff(doStuffCallback);
doStuff(function doStuffCallback() { });
All this time I've been using the full named function expressions over arrow functions just for the stack traces.