Mixed Message : Fortune Teller

Hi everyone!

Here’s what I made in the ‘Mixed Messages’ portfolio project. Hope you like it. Feedback is always welcome.

let futurePrediction = () => { const people = ['you', 'mother', 'father', 'brother', 'grandma', 'grandma', 'partner', 'best friend', 'worst enemy', 'teacher', 'boss', 'pet'] const actions = ['pass away', 'win the lotery', 'get cheated', 'get married', 'lose his/her cellphone', 'crash his/her car', 'get fired from work', 'travel to another country', 'get pregnant', 'find what was looking for', 'get sick'] const time = ['whithin the next hour', 'tonight', 'tomorrow', 'soon enought', 'in two days', 'next week', 'in two weeks', 'next month', 'next year', 'in two years', 'in five years', 'in ten years', 'in twenty years'] let who = people[Math.floor(Math.random()*people.length)] let what = actions[Math.floor(Math.random()*actions.length)] let when = time[Math.floor(Math.random()*time.length)] if (who === people[0]) { console.log(`You will ${what} ${when}!`) } else { console.log(`Your ${who} will ${what} ${when}!`) } }; futurePrediction()
1 Like

i like it and and fun to run it