Share your repls and programming experiences

← Back to all posts
Fortune Teller Life
nbash

This is the teller life! :)

Voters
AmoghTheCool
nbash
Comments
hotnewtop
FlaminHotValdez

hello can you please not use the word life it reminds me of dying and according to you dying is not allowed

MrVoo

Error on line 4, you set fortune to fortune instead of whatever it's supposed to be

MrVoo

You should also turn this into a website, instead of a blank page with a JavaScript prompt

nbash

BRO @MrVoo

MrVoo

@nbash Still doesn't work :P

nbash

@MrVoo Ill hadd you to help me then

MrVoo

@nbash Huh?

MrVoo

@nbash Fixed :P

nbash

@MrVoo ;-;

MrVoo

@nbash hehe

nbash

@MrVoo ;-; ;-; ;-;

nbash

my code = let question = prompt ("Ask me a yes or no question and I'll predict the answer.");
let lenght = question.lenght;
let numberOfFortunes = 6;
fortune = fortune % numberOfFortunes;

if (fortune === 0)
{
alert ("Definitely.");
}
else if (fortune === 1)
{
alert ("Probably not.");
}
else if (fortune === 2)
{
alert ("The stars are cloudy and the answer is uncertain.");
}
else if (fortune === 3)
{
alert ("It's your lucky day.");
}
else if (fortune === 4)
{
alert ("Not a chance");
}
else
{
alert ("It is likely.");
}