Arrow Function is a short and modern way to write functions in JavaScript.

It was introduced in ES6 (ECMAScript 2015).

const functionName = (parameters) => {
  // code
};

Normal Function:

function add(a, b){
  return a + b;
}
console.log(add(5,3));


Arrow function

const add = (a, b) => {
  return a + b;
};
console.log(add(5,3));


Short Arrow Function

const add = (a, b) => a + b;
console.log(add(5,3));