javascript some arrow function code example
Example 1: how to make javascript function consise
multiplyfunc = (a, b) => { return a * b; }
Example 2: javascript arrow function
let errow = () => {
//the code you want to return;
};
Or
let errow = ('paramiter') => {
//the code you want to return
}
Example 3: concise body arrow functions javascript
const plantNeedsWater = day => day === 'Wednesday' ? true : false;
//If only 1 Parameter no () needed
//Single line return is implicit
//Single line no {} needed