tc39 / proposal-do-expressions

Proposal for `do` expressions
MIT License
1.11k stars 14 forks source link

Clarify question: Is it possible to use return in an arrow function with a expression body? #62

Closed Jack-Works closed 3 years ago

Jack-Works commented 3 years ago

Is this valid?

const x = () => (do { return 1 })
Jack-Works commented 3 years ago

Note: I'm not requesting this

bakkot commented 3 years ago

Yes, that would be allowed.