Back to articles
Why JavaScript Developers Are Obsessed With Arrow Functions

Why JavaScript Developers Are Obsessed With Arrow Functions

via Dev.to JavaScriptKunal

While writing my blog on JavaScript Promises there I use arrow function a lot. So i thought why not to explain what is Arrow function and why most developers use this. Blog on JavaScript Promises 👇 JavaScript Promises Explained: A Startup Analogy for Beginners Kunal ・ Mar 1 #javascript #webdev #discuss #node Topics to Cover What arrow functions are Basic arrow function syntax Arrow functions with one parameter Arrow functions with multiple parameters Implicit return vs explicit return Basic difference between arrow function and normal function Arrow Functions Arrow function are introduce in ES6 version of the language. So to learn about Arrow function lets first start from the standard way of writing Function (the old way) . Lets make a Function that adds two numbers function add(a, b) { return a + b; } console.log(`1 + 2 is`, add(1, 2)); The above code return something like 1 + 2 is 3 Code executed with no errors right ? So why we need to introduce arrow function . Lets understand fir

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
4 views

Related Articles