JavaScript

Explain arrow function differences

Medium
5
Added
No own this binding, cannot be constructors, no arguments object

Solution Code

JavaScript
const add = (a, b) => a + b;
Explanation
Arrow functions inherit this from enclosing lexical context.

Guided Hints

Compare with regular functions
When to avoid arrow functions?