zakkudesu
7/20/2019 - 1:18 AM

Function Syntax JS

//JavaScript Function Syntax


//Function Declaration

function divide1(a, b) {
  return a / b; 
}

//Function Expression

const divide2 = function(a, b) {
  return a / b;
}

//Arrow Function Expression

const divide3 = (a, b) => {
  return a / b;
}

//Arrow Function Expression - concise

const divide4 = (a, b) => a / b;