Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function answerMe() {
- var roll = Math.floor(Math.random()*20); // generates the random number between 0 and 19
- var answers = [ 'You may rely on it', 'Outlook good', 'Very doubtful',
- 'My sources say no', 'Yes', 'Cannot predict now',
- 'Don\'t count on it', 'Signs point to yes', 'As I see it, yes',
- 'It is certain', 'Reply hazy, try again', 'My reply is no',
- 'Concentrate and ask again', 'Without a doubt',
- 'Better not tell you now', 'Ask again later', 'Outlook not so good',
- 'It is decidedly so', 'Most likely', 'Yes definitely'];
- // Big array with all the answers
- return answers[roll];
- // Returns the answer with the index of the random roll
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement