They are not "a way to reduce the lines of code around writing functions". They are a new feature of the language that does not behave exactly like functions.
Do:
const a = function(){};
console.log(a.prototype);
=> look for the [[Scopes]] in the constructor.
Now try the same with:
const b = () => {};
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
fat arrow functions and functions are not the same thing
blog.wax-o.com/2020/03/es6-and-esn...
They are not "a way to reduce the lines of code around writing functions". They are a new feature of the language that does not behave exactly like functions.
Do:
const a = function(){};
console.log(a.prototype);
=> look for the [[Scopes]] in the constructor.
Now try the same with:
const b = () => {};