DEV Community

Discussion on: Arrow Function: Basics

 
bhagatparwinder profile image
Parwinder 👨🏻‍💻

Your bullet point 2 is generally how folks write functions if they are not using shorthand. That is why my blog post starts with the example of an arrow function that has {} and return.

The shorthand is omitting the braces and return when there is one expression, Which is reflected by the fourth bullet point (or the part you just quoted). So at this point I am covering both the points you mentioned.

Thanks for the feedback.

Thread Thread
 
pentacular profile image
pentacular

Sure. The main thing is not to conflate expressions and statements. :)