Need some help


#1

can someone fix this code and post it in reply?
if been getting instruction what to do but i cant do it
can someone just fix this code and post it back to me? thx

var userChoice = prompt("how are you feeling today on a scale from 1 to 10?");
var computerChoice = Math.random();
if (userChoice == 1) {
if (computerChoice <= 0.33){
computerChoice = "aww that sucks! hope you feel better soon";
}
else if(computerChoice >= 0.34 && 0.66){
computerChoice = "thats not nice to hear :frowning: hope you will cheer up soon!";
}
else{
computerChoice = "thats afwull! hope you have a nice day anyway!";
}
}

var computerChoice1 = Math.random();
if (userChoice == 2) {
if (computerChoice1 <= 0.33){
computerChoice1 = "aww that sucks! hope you feel better soon1";
}
else if(computerChoice1 >= 0.34 && 0.66){
computerChoice1 = "thats not nice to hear :frowning: hope you will cheer up soon1!";
}
else{
computerChoice1 = "thats afwull! hope you have a nice day anyway1!";
}
}

var computerChoice2 = Math.random();
if (userChoice == 2) {
if (computerChoice2 <= 0.33){
computerChoice2 = "ooh thats not good! heres a smiley for you! :)";
}
else if(computerChoice2 >= 0.34 && 0.66){
computerChoice2 = "to bad! cheer up it will get better!";
}
else{
computerChoice2 = "aww that terrible :frowning: thinks will get beter soon!";
}
}

var computerChoice3 = Math.random();
if (userChoice == 3) {
if (computerChoice3 <= 0.33){
computerChoice3 = "just hang in there things will get better";
}
else if(computerChoice3 >= 0.34 && 0.66){
computerChoice3 = "im here for you :slight_smile: to cheer you up with a smiley :)";
}
else{
computerChoice3 = "aww you can do better! cheer up";
}
}

var computerChoice4 = Math.random();
if (userChoice == 4) {
if (computerChoice4 <= 0.33){
computerChoice4 = "thats not so good. but hey thinks will get better soon :)";
}
else if(computerChoice4 >= 0.34 && 0.66){
computerChoice4 = "hmm thats not so nice to hear, cheer up champ!";
}
else{
computerChoice4 = "there are allot off people out there! your not alone";
}
}

var computerChoice5 = Math.random();
if (userChoice == 5) {
if (computerChoice5 <= 0.33){
computerChoice5 = "mwhaa could be better right :wink:";
}
else if(computerChoice5 >= 0.34 && 0.66){
computerChoice5 = "comon cheer up mate! your not alone!";
}
else{
computerChoice5 = "hang in there champ! thinks will get better";
}
}

var computerChoice6 = Math.random();
if (userChoice == 6) {
if (computerChoice6 <= 0.33){
computerChoice6 = "me too.. me too..";
}
else if(computerChoice6 >= 0.34 && 0.66){
computerChoice6 = "hey! thats not so bad, your day might get even better!";
}
else{
computerChoice6 = "hey thats not bad at all there are people out there doing worse!";
}
}

var computerChoice7 = Math.random();
if (userChoice == 7) {
if (computerChoice7 <= 0.33){
computerChoice7 = "nice! keep up the good vibes";
}
else if(computerChoice7 >= 0.34 && 0.66){
computerChoice7 = "hey you! you rock!";
}
else{
computerChoice7 = "keep it up! you might cheer up someone else with your good atitude :)";
}
}

var computerChoice8 = Math.random();
if (userChoice == 8) {
if (computerChoice8 <= 0.33){
computerChoice8 = "marvelous! keep it up!";
}
else if(computerChoice8 >= 0.34 && 0.66){
computerChoice8 = "thats so great to hear!";
}
else{
computerChoice8 = "ooh wauw! thats great to hear!";
}
}

var computerChoice9 = Math.random();
if (userChoice == 9) {
if (computerChoice9 <= 0.33){
computerChoice9 = "yeaah! great to see ur happy!";
}
else if(computerChoice9 >= 0.34 && 0.66){
computerChoice9 = "wonderfull! keep up the good vibes!";
}
else{
computerChoice9 = "hey there! did you know?.. you are awsome!";
}
}

var computerChoice10 = Math.random();
if (userChoice == 10) {
if (computerChoice10 <= 0.33){
computerChoice10 = "did you just win the lottery??";
}
else if(computerChoice10 >= 0.34 && 0.66){
computerChoice10 = "amazing! i hope you keep feeling this way!";
}
else{
computerChoice10 = "great! share your good vibes!";
}
}


#2

#3

you already have an open topics here:


don't keep spamming new topics while many people already try to help you.