I am increasingly seeing javascript code where functions are being defined as
const funcName = () => {
};
Is this a better way of declaring functions now that we have ES6 :
I am increasingly seeing javascript code where functions are being defined as
const funcName = () => {
};
Is this a better way of declaring functions now that we have ES6 :
Is this a better way of declaring functions now that we have ES6.
No. It's just a (very concise) way to do it. Every kind of function definition has slightly different behavior and therefore different pros and cons. Use the one that fulfills your need and communicates your intend.
Some resources: