How to conditionally build an object in JavaScript with ES6

How to conditionally build an object in JavaScript with ES6

More to explore