0

I'm trying to follow a proper code style using ES6 but I'm having some trouble understanding when should I use "=>". Until now I'm using arrows for callbacks, where before I would write an anonymous function.

But my question is: Should I use arrows also when declaring a function?

function myFunc(param) { ... }

Should be changed to:

myFunc: (param) => {...}

(?)

Thanks for reading, I hope this question helps also others struggling with using ES6 in their code.

Marco
  • 1

0 Answers0