=> javasceipt code example
Example 1: () = javascript
//Normal function
function sum(a, b) {
return a + b;
}
//Arraw function
let sum = (a, b) => a + b;
Example 2: 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