Skip to content

Instantly share code, notes, and snippets.

@jasonbellamy
Created June 16, 2016 15:22
Show Gist options
  • Save jasonbellamy/f15129dc4a2723f7a706dfd1c670c7ca to your computer and use it in GitHub Desktop.
Save jasonbellamy/f15129dc4a2723f7a706dfd1c670c7ca to your computer and use it in GitHub Desktop.
const generator = (x, y = x) => {
return {x: `_${x}`, y};
};
@himynameisdave
Copy link

himynameisdave commented Jun 16, 2016

const generator = (x, y = x) => ({x: `_${x}`, y});

☝️ that's how us professional JS devs do it, one day you'll get there too @jasonbellamy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment