Q12: How do Arrow Functions differ from Regular Functions?
Arrow functions: 1) Do not bind their own this or arguments object. 2) Cannot be used as constructor functions with new. 3) Do not have a prototype property. 4) Cannot be used as generator functions.
Key Takeaways
- Arrow functions inherit lexical
thisandarguments. - They cannot act as constructors or generators.
Knowledge Check
What error is thrown when invoking an arrow function with the `new` keyword?