Arrow functions should NOT be used:
- When we want function hoisting – as arrow functions are anonymous.
- When we want to use this/arguments in a function – as arrow functions do not have this/arguments of their own, they depend upon their outer context.
- When we want to use named function – as arrow functions are anonymous.
- When we want to use function as a constructor – as arrow functions do not have their own this.
- When we want to add function as a property in object literal and use object in it – as we can not access this (which should be object itself).