12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- console.clear();
-
- let combinations = [
- ['Behind', 'Inside',
- 'Why you should hate', 'Beyond', 'Beneath', 'Below'],
- ['the', 'the best', 'the worst', 'the smallest',
- 'the coolest', 'every amazing', 'the biggest',
- 'the toughest', 'the strongest', 'the prettiest',
- 'every happy', 'the', 'every incredible'],
- ['joy', 'buzzword', 'douchebag', 'moment','man','woman',
- 'machine', 'experience', 'jawn', 'dog', 'Shiv', 'spaceship', 'romance',
- 'love'],
- [':'],
- ['', 'stupendous', 'the ugliest',
- 'real life', 'the prettiest', 'the shiniest',
- 'the neediest', 'very complex', 'amazing',
- 'aggressive', 'handsome', 'arrogant', 'speedy',
- 'lovely', 'lazy', 'learned', 'nervous', 'thoughtless',
- 'high-performance', 'charming', 'narcissistic', 'violent'],
- ['apathy', 'jealousy', 'empathy', 'evil', 'beauty',
- 'vindictiveness', 'avarice', 'stupidity', 'greed',
- 'love', 'voilence', 'generosity', 'popularity',
- 'chivalry', 'masculinity', 'infidelity']
- ]
-
- const sentenceDisplay:HTMLElement = document.getElementById('sentenceDisplay');
- const button:HTMLElement = document.getElementById('button');
- button.addEventListener('click', () => {generate();})
-
- function generate()
- {
- let confTalkName:string[] = [];
-
- for(let i = 0; i < combinations.length; i++)
- {
- confTalkName.push(newSentence(combinations[i]));
- }
-
- sentenceDisplay.innerHTML = confTalkName.join(' ');
-
- }
-
- function newSentence(array:string[]):string
- {
- return array[Math.floor(Math.random() * array.length)
- ];
-
- }
|