App.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637
  1. console.clear();
  2. var combinations = [
  3. ['Behind', 'Inside',
  4. 'Why you should hate', 'Beyond', 'Beneath', 'Below'],
  5. ['the', 'the best', 'the worst', 'the smallest',
  6. 'the coolest', 'every amazing', 'the biggest',
  7. 'the toughest', 'the strongest', 'the prettiest',
  8. 'every happy', 'the', 'every incredible'],
  9. ['joy', 'buzzword', 'douchebag', 'moment', 'man', 'woman',
  10. 'machine', 'experience', 'jawn', 'dog', 'Shiv', 'spaceship', 'romance',
  11. 'love'],
  12. [':'],
  13. ['', 'stupendous', 'the ugliest',
  14. 'real life', 'the prettiest', 'the shiniest',
  15. 'the neediest', 'very complex', 'amazing',
  16. 'aggressive', 'handsome', 'arrogant', 'speedy',
  17. 'lovely', 'lazy', 'learned', 'nervous', 'thoughtless',
  18. 'high-performance', 'charming', 'narcissistic', 'violent'],
  19. ['apathy', 'jealousy', 'empathy', 'evil', 'beauty',
  20. 'vindictiveness', 'avarice', 'stupidity', 'greed',
  21. 'love', 'voilence', 'generosity', 'popularity',
  22. 'chivalry', 'masculinity', 'infidelity']
  23. ];
  24. var sentenceDisplay = document.getElementById('sentenceDisplay');
  25. var button = document.getElementById('button');
  26. button.addEventListener('click', function () { generate(); });
  27. function generate() {
  28. var confTalkName = [];
  29. for (var i = 0; i < combinations.length; i++) {
  30. confTalkName.push(newSentence(combinations[i]));
  31. }
  32. sentenceDisplay.innerHTML = confTalkName.join(' ');
  33. }
  34. function newSentence(array) {
  35. return array[Math.floor(Math.random() * array.length)];
  36. }