joriszwart.nl

I code dreams™

Don’t

$ console.log(name, surname)
> Jane Doe

Do

$ console.log({ name, surname })
> {name: "Jane", surname: "Doe"}

This works due to ES2015 shorthand object properties.