0
How do arrow functions differ from regular functions?
subina kallyani
easy
0completed
344
Answer
Arrow functions are a shorter way to write functions in JavaScript, but they behave differently from regular functions.
Key Differences:
- No
thisbinding
Arrow functions do not have their ownthis.
They use thethisvalue from their surrounding scope.
Regular functions have their ownthis. - Shorter syntax
Arrow functions are more concise. - Cannot be used as constructors
You cannot usenewwith arrow functions. - No
argumentsobject
Arrow functions don’t have their ownarguments.
Regular functions do. - No
prototype
Arrow functions do not have aprototypeproperty.
Click to Reveal Answer
Tap anywhere to see the solution
Revealed
Comments0