Regular Functions vs Arrow Functions
2 min readOct 17, 2020
In JavaScript, functions can be defined in many ways.
Usually functions are defined by using function keyword, popularly know as regular functions. They can be done in two ways.
First,
function sayHello(who)
{
return `Hello, ${who}`;
}
Second,
const sayHello = function(who)
{
return `Hello, ${who}`;
}
Using arrow functions,
const sayHello = (who) => {
return `Hello, ${who}!`;
}