Arrow functions provide a shorter syntax:
// Traditional
const add = function(a, b) {
return a + b
}
// Arrow
const add = (a, b) => {
return a + b
}
// Arrow with implicit return
const add = (a, b) => a + b
When the body is a single expression, you can omit braces and return. The result is automatically returned.