Arrow functions
let sumOfTwoNumbers=(a,b)=>{
return a+b;
}
let sumOfTwoNumbers=(a,b)=>a+b
let checkEven=n=>n%2==0;
Named functions
function sumOfTwoNumbers (a,b){
return a+b;
}
Function expression
let sumOfTwoNumbers=function (a,b){
return a+b;
}
let sumOfTwoNumbers=(a,b)=>{
return a+b;
}
let sumOfTwoNumbers=(a,b)=> a+b;