arrow functions javascript

JavaScript
//If body has single statement
let myFunction = (arg1, arg2, ...argN) => expression

//for multiple statement
let myFunction = (arg1, arg2, ...argN) => {
    statement(s)
}
//example
let hello = (arg1,arg2) => "Hello " + arg1 + " Welcome To "+ arg2;
console.log(hello("User","Grepper"))
//Start checking js code on chrome inspect option(param1, param2, …, paramN) => { statements } 
(param1, param2, …, paramN) => expression
// equivalent to: => { return expression; }

// Parentheses are optional when there's only one parameter name:
(singleParam) => { statements }
singleParam => { statements }

// The parameter list for a function with no parameters should be written with a pair of parentheses.
() => { statements }
//Normal function
function sum(a, b) {
  return a + b;
}

//Arraw function
let sum = (a, b) => a + b;const suma = (num1, num2) => num1+num2
console.log(suma(2,3));
//5multiplyfunc = (a, b) => { return a * b; }hello = () => {
	return "Hi All";
}
Source

Also in JavaScript: