Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const keys = {
- "Coding": 10,
- "Mountain Biking": 10,
- "Hiking": 9,
- "Washing Dishes": 2,
- "Rainy Days": 0
- }
- const options = ["Coding", "Mountain Biking", "Hiking", "Washing Dishes", "Rainy Days"]
- let returnMessage = (selected) => `${selected}: ${keys[selected]} out of 10 Excitement Level.`
- let num = Math.floor(Math.random() * Math.floor(4))
- returnMessage(options[num])
- // OUTPUT THE RESULT
- returnMessage(options[Math.floor(Math.random() * Math.floor(4))])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement