Arrow functions - example 1
A simple example with one parameter, using template literals to return the result.let arrowFunction1 = (x) => {
return `Hello ${x},<br> from the first arrow function`;
}
Or even without the (), as there's only one parameter, x.
let arrowFunction1 = x => {
return `Hello ${x},<br> from the first arrow function`;
}
Or just on one line.
let arrowFunction1 = x => `Hello ${x},<br> from the first arrow function`;
RESULT: arrowFunction1('John Doe')