Arrow function in JavaScript
what is arrow function in JavaScript?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bidyasagar MishraRank #766 · 3K reputationPosted Sep 20, 2019, 7:55 PM EDT
JavaScript Arrow Functions
Arrow functions are not supported in IE11 or earlier.
"demo"
>Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 20, 2019, 10:35 PM EDT
Chittaranjan SwainRank #216 · 11.3K reputationPosted Sep 20, 2019, 9:25 PM EDT
Arrow functions were introduced in ES6.
this,arguments,super, ornew.targetkeywords. Arrow function expressions are ill suited as methods, and they cannot be used as constructors.'Hydrogen',
'Helium',
'Lithium',
'Beryllium'
];
console.log(materials.map(material => material.length));
// expected output: Array [8, 6, 7, 9]
Ankit KanojiaRank #380 · 6.6K reputationPosted Jan 9, 2021, 3:54 AM EST
Why choose Arrow function?