Skip to content

Instantly share code, notes, and snippets.

@rjcorwin
Created June 25, 2020 16:36
Show Gist options
  • Save rjcorwin/4dde08095d6bad00842eee663af15952 to your computer and use it in GitHub Desktop.
Save rjcorwin/4dde08095d6bad00842eee663af15952 to your computer and use it in GitHub Desktop.
const yes_no = function() {
const possibilities = [
[
{
"label": "yes",
"name": "1",
"value": ""
},
{
"label": "no",
"name": "0",
"value": "on"
}
],
[
{
"label": "yes",
"name": "1",
"value": "on"
},
{
"label": "no",
"name": "0",
"value": ""
}
]
]
return possibilities[Math.floor(Math.random() * possibilities.length)]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment