Why do we need an arrow function?
Introduction
Before ES6, there was only one way to write functions in JavaScript.
function traditionalFunc(str){
console.log(str);
}
traditionalFunc("Hello"); //Hello
What if you can write it more concisely?
const arrowFunc = str => console.log(...
rajashreeparhi.hashnode.dev3 min read
clevercoderjoy
I write code and I lift weights
Nicely written!