ES5 to ES6
function to => Let's start with the basic ES5 function. function sayHello (name){ console . log ( "Hello" + name) ; } Let us assign the above function to a variable sayHello , var sayHello = function (name){ console . log ( "Hello " +name) ; } Let's transform es5 function to es6 function, Step 1 : Get rid of function var sayHello = (name){ Step 2 : introduce a new symbol => which is going to replace the word function var sayHello = =>(name) Step 3 : Move the => after the () var sayHello = (name) => That's it, now look at the transformation of the es5 to es6 var sayHello = (name) => { console . log ( "Hello " +name) ; } That was beginner level stuff, let's make it shorter like a pro, by getting rid of parentheses around " name ", so to add your knowledge level, you don't need enclose your argument with () , if there is only one argument, you need () , only ...