Limitations of Arrow Functions: Anonymous and Not a Constructor

Get to know the limitations of arrow functions before using them and learn the anonymous behavior of arrow functions.

Due to the concise and expressive nature of arrow functions, we’ll be tempted to use them instead of anonymous functions. However, the choice should not be due to infatuation. Learning about the limitations of arrow functions will help you make an educated choice between anonymous functions and arrow functions.

Following are some of the limitations of using arrow functions.

  1. They are only anonymous.
  2. They are not constructors.
  3. new.target is lexically scoped.
  4. There is no prototype property.
  5. They can’t be generators.
  6. throw needs wrapping
  7. You have to use caution returning object literals

In this lesson, we will discuss the first two constraints.

Get hands-on with 1400+ tech skills courses.