12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. console.clear();
  2. let 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. const sentenceDisplay:HTMLElement = document.getElementById('sentenceDisplay');
  25. const button:HTMLElement = document.getElementById('button');
  26. button.addEventListener('click', () => {generate();})
  27. function generate()
  28. {
  29. let confTalkName:string[] = [];
  30. for(let i = 0; i < combinations.length; i++)
  31. {
  32. confTalkName.push(newSentence(combinations[i]));
  33. }
  34. sentenceDisplay.innerHTML = confTalkName.join(' ');
  35. }
  36. function newSentence(array:string[]):string
  37. {
  38. return array[Math.floor(Math.random() * array.length)
  39. ];
  40. }