DEV Community

Ajay Baraiya
Ajay Baraiya

Posted on

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};
3) const x = (par1, par2) => {retunr "when more then one parameters we require parenthesis" + para1 + para2};
4) const x = () => {return "If no use of parameter then"};
5) this keyword always represents the object that defined the arrow function and not the one which called the function like button or etc.

Top comments (0)