Skip to content

Instantly share code, notes, and snippets.

@cliff76
Created June 28, 2019 19:54
Show Gist options
  • Select an option

  • Save cliff76/661116585bfecb2156b0f65777004365 to your computer and use it in GitHub Desktop.

Select an option

Save cliff76/661116585bfecb2156b0f65777004365 to your computer and use it in GitHub Desktop.
Random threat generator using Github's Wordbot
Promise.all(
['wrestlers', 'verbs', 'nouns', 'verbs'].map(
it => fetch('https://api.noopschallenge.com/wordbot?set=' + it)
.then(response => response.json()).then(each => each.words[0])
)
).then(all => console.log(
'Hello, my name is '
+ all[0] + '. You '
+ all[1] + 'ed my '
+ all[2] + ', Prepare to '
+ all[3] + '!!!')
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment