DEV Community

Discussion on: Make your function calls more readable

hamatti profile image
Juha-Matti Santala Author • Edited on

I agree that the syntax for that is really confusing. Every time I write it, I have to check to make sure I'm putting things in the right place.

It gets even more confusing when you also rename properties:

const { foo: bar = 120 } = baz

What it does is essentially:

const bar = === undefined : 120 ?