Originally Posted by rdspoons
This may help. You can compare the code and the comments to your original code.
//You may want to add your own default word for the prompt to
//avoid the prompt's 'undefined' default.
var name=prompt("Hi. Whats your name?","friend")
var mood=prompt("Hi " + name + ". How are you?") //'undefined' is the default answer
//remember to put your conditional comparisons inside of parentheses.
alert("Im glad you are fine, " + name)
//you can use an if..else if.. else struture to allow a default
//answer if neither 'fine' nor 'bad' are given as the response.
//dont' forget mood=bad is an asignment, not a comparison.
alert("Ooo. Thats bad, Im sorry. I hope you get better, " + name)
//and maybe add a default greeting in case 'fine' or 'bad' are not entered
alert("So..., it looks like you're in a " + mood +" mood, " + name)
//And don't forget to close the script tag
Thanks actually worked thank you very mcuh youre such a pro