function with an arrow function as parameter code example

Example 1: arrow function rec

(param1, param2,, paramN) => { statements } 
(param1, param2,, paramN) => expression
// equivalent to: => { return expression; }

// Parentheses are optional when there's only one parameter name:
(singleParam) => { statements }
singleParam => { statements }

// The parameter list for a function with no parameters should be written with a pair of parentheses.
() => { statements }

Example 2: javascript arrow function

let errow = () => {
  //the code you want to return;
};
Or
let errow = ('paramiter') => {
//the code you want to return
}