5 ms·
Actually, I believe arrow functions keep the name of the binding. const diameter = () => {}; export const radius = () => {}; Could be wrong.
by clessg 11y ago
Actually, I believe arrow functions keep the name of the binding.
const diameter = () => {};
export const radius = () => {};
Could be wrong.
- _getify 11y agoWhat you're thinking about in ES6 is called "function name inference" and only refers to certain forms, like this one, where the name -- PURELY FOR DEBUGGING -- can be inferred. Actually, it goes for all assignments, `var`, `let`, and `const`. Otherwise, the arrow itself is anonymous and thus you don't have a name to make an inner self-reference with.