Overview

Arrow functions are similar to Java and Pythons lambda function. Arrow functions can be used instead of Javascript traditional function definition. Arrow functions are more compact but there are some limitations:

  • No bindings to this or super so it should not be used inside object if they are to be methods
  • No access to arguments or new.target
  • Should not be used with callapply and bind methods because they rely on a scope or the current context where it is being executed
  • Cannot be used as a constructor
  • Cannot use yield in its definition

#arrow-functions #javascript #frontend-development

Javascript Arrow Function
2.15 GEEK