DEV Community

Discussion on: The shortest way to conditional insert properties into an object literal

Collapse
 
bobmyers profile image
Bob Myers

It's called an "idiom". Like any other idiom, including idioms in naturally language, you have to learn it. That doesn't mean it's not useful. If people run into it and are not familiar with it, they'll figure it out quickly and then know it themselves.

Collapse
 
jfet97 profile image
Andrea Simone Costa

I completely agree with you.