Arrow functions छोटे होते हैं, लेकिन असली अंतर सिर्फ़ syntax में नहीं बल्कि binding behavior में है।
const regular = function () {};
const arrow = () => {};
const short = x => x * 2; // implicit return for one expression
मुख्य अंतर
— arrows को enclosing scope से inherit करते हैं। यह सबसे महत्वपूर्ण अंतर है और इसीलिए वे callbacks के लिए बेहतरीन हैं:
