ES6 Arrow functions quick notes

  1. const x = (x,y) => {return x*y};
  2. const x = (parameter) => {return "Hellow World!" + parameter};
  3. const x = parameter => {retunr "Hellow World!" + parameter};
  4. const x = (par1, par2) => {retunr "when more then one parameters we require parenthesis" + para1 + para2};
  5. const x = () => {return "If no use of parameter then"};
  6. this keyword always represents the object that defined the arrow function and not the one which called the function like button or etc.