I'm shortening a function expression to an arrow function expression.
When can I remove the curly brackets of the function? Can you always or is there a rule when you're allowed?
I see on (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) it says you can drop curly brackets when you use just a single expression:
However, I understood the following to be 2 expressions, and the absence of curly brackets doesn't stop the function from running. It does still create an implicit return and just returns the first expression. Is this all I need to know about getting rid of curly brackets in arrow function expressions?
f = () => x = 5 * 5; this;
console.log(f());