Functions
A function is a reusable block of code you can run whenever you need it, optionally passing in values and getting a value back.
Declaring and calling a function
name is a parameter — a placeholder for whatever value gets passed in when the function is called. return sends a value back out.
Arrow functions
Arrow functions are a shorter way to write a function, especially for simple ones:
Note: when an arrow function's body is a single expression, the result is returned automatically — no
return keyword needed.