I am used to the following arrow syntax:
(var1, var2, var3) => {
statement1;
statement2;
...
}
However, I've also seen it simplified to just:
var1 => something
What are the rules for when the arrow statement can be simplified. Specifically:
- Not need parens before the
=>
? - Not need
{
...}
around the function body?