Arrow Functions

suggest change

Arrow function is the new way of defining a function in ECMAScript 6.

// traditional way of declaring and defining function
var sum = function(a,b)
{
    return a+b;
}

// Arrow Function
let sum = (a, b)=> a+b;

//Function defination using multiple lines 
let checkIfEven = (a) => {
    if( a % 2 == 0 )
        return true;
    else
        return false;
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents