const add = (a, b) => a + b;
const square = x => x * x;
const greet = () => console.log('hi');- Shorter syntax, implicit return for single expressions
- No own this — inherits it from the enclosing scope (great for callbacks)
- Cannot be used as a constructor (no new)
- No arguments object — use rest parameters instead
Tip
Give one concrete reason to avoid arrow functions: object methods that need their own this.