Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upnext = "Define two arrays with different pools of answers";
- commonAnswers = ['Definitely', 'Yes', 'Maybe', 'No', 'Absolutely not'];
- rareAnswers = ['Fuck you', 'I was about to ask you the same thing', 'What about you?', 'It shall be so', 'The stars say no but I disagree', 'The stars say yes but I disagree', 'You do not deserve to know about this', 'Some questions are better left unanswered...', 'I wish', 'No but it will change in the future'];
- upnext = "Generate a random number between 1 and 100";
- randomNumber = (Math.round(Math.random() * 99 + 1));
- upnext = "Determine which answer pool to use based on the number";
- if(randomNumber <= 5){
- answerPool = rareAnswers;
- }else{
- answerPool = commonAnswers;
- }
- upnext = "Get a random answer from the selected pool and give the output";
- answerPool[Math.floor(Math.random() * (answerPool.length - 1))];
Add Comment
Please, Sign In to add comment