fortune.js
1    let question = prompt("Ask me a yes or no question and I’ll predict the answer.");
2    let length = question.length;
3    let fortune = Math.floor(Math.random() * length);
4    let numberOfFortunes = 6;
5    fortune = fortune % numberOfFortunes;
6    
7    if (fortune === 0)
8    {
9      alert("Definitely.");
10   }
11   else if (fortune === 1)
12   {
13     alert("Probably not.");
14   }
15   else if (fortune === 2)
16   {
17     alert("The stars are cloudy and the answer is uncertain.");
18   }
19   else if (fortune === 3)
20   {
21     alert("It’s your lucky day.");
22   }
23   else if (fortune === 4)
24   {
25     alert("Not a chance.");
26   }
27   else
28   {
29     alert("It is likely.");
30   }
31