12345678910111213141516171819202122232425262728293031323334353637 |
- console.clear();
- var 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']
- ];
- var sentenceDisplay = document.getElementById('sentenceDisplay');
- var button = document.getElementById('button');
- button.addEventListener('click', function () { generate(); });
- function generate() {
- var confTalkName = [];
- for (var i = 0; i < combinations.length; i++) {
- confTalkName.push(newSentence(combinations[i]));
- }
- sentenceDisplay.innerHTML = confTalkName.join(' ');
- }
- function newSentence(array) {
- return array[Math.floor(Math.random() * array.length)];
- }
|