MY #100 DAYS OF CODE CHALLENGE JOURNEY-DAY 13

in #coding6 years ago

IMG_20190215_173911.jpg

Welcome to my daily 100days of code challenge once again and today, I am going to discuss about arrow functions.

Arrow function as a new feature in ES6 was introduced as a way of making the syntax of functions easier. It simplifies and compacts function syntax.

Functions are written in the earlier versions of JavaScript as below:

let doWork = function (x,y) {
return x+y;

}

The above function doWork() takes two parameters and return their sum. From the above function declaration, the keyword is involved.

To write doWork() function using the arrow function, we simply eliminate the function keyword and replace it with the symbols =>

let doWork = (x+y) => x+y;

This is just a simple use of arrow function above.

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.030
BTC 59085.79
ETH 2543.81
USDT 1.00
SBD 2.36