when to use an arrow function code example
Example: name arrow function
//Long version
function add(a, b) {
return a + b;
}
// Shorthand
const add = (a, b) => a + b;
//Long version
function add(a, b) {
return a + b;
}
// Shorthand
const add = (a, b) => a + b;