Skip to content

Instantly share code, notes, and snippets.

@odykyi
Last active May 7, 2017 14:48
Show Gist options
  • Save odykyi/410d88cede0a5cb534e76fbbd71848ff to your computer and use it in GitHub Desktop.
Save odykyi/410d88cede0a5cb534e76fbbd71848ff to your computer and use it in GitHub Desktop.
isRequired.js
const isRequired = () => { throw new Error('param is required'); };
const hello = (name = isRequired()) => { console.log(`hello ${name}`) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment