Skip to content

Instantly share code, notes, and snippets.

@souhe
Created November 19, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhe/3f97e755129ef3094b4db5723f51327a to your computer and use it in GitHub Desktop.
Save souhe/3f97e755129ef3094b4db5723f51327a to your computer and use it in GitHub Desktop.
let handleOptionChange = (option, explanation) => {
// saving the option somewhere
if (option === "bad" && explanation) {
// saving explanation somewhere
}
}
// later in the code
handleOptionChange('bad', 'I hate ReasonML');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment