I had a previous issue with this but I got it fixed now I'm having a new issue below is the code.
<!DOCTYPE html>
<html lang="en">
<title>Weather</title>
<head>
<script>
var temp = prompt("Enter the temp from outside");
var sky = prompt("tell us what it is like outside put ether sun, rain, snow (it is case sensitive so follow orders.)");
function getHot(temp) {
if (temp >= 100) {
document.write ("Bet u wish you could go naked but shorts and T-shirt will do.");
}
else if (temp >= 60) {
document.write ("Ok thats a bit better but i would say shorts and T-shirt would be good.")
}
else if (temp >= 40){
document.write ("Getting a bit nippy out maybe get some pants and a jacket.")
}
else if (temp >= 0){
document.write ("Sucks to be you right now put on you big boy pants get a sweater and put a heavy coat on.")
}
else if (temp <= -1){
document.write ("Stay inside you fool theres no need to freeze to death.")
}
else {
document.write ("you mess with me i mess with you refresh to do this right.")
}
}
function getLight(sky) {
if (sky = sun){
document.write ("Enjoy the light get out your house it's good for you inless it's to hot or to cold then hide from the light.")
}
else if (sky = rain){
document.write ("Can't beleave you have to ask this but get a umbrella and maybe a poncho.")
}
else if (sky = snow){
document.write ("If you are afraid of getting wet then use a umbrella other then that bundle up.")
}
else {
document.write ("not going to tell you again follow what i say refresh and do it again.")
}
}
getHot(temp);
getLight(sky);
</script>
</head>
</html>
Ok so it prompts the user for the 2 inputs but then it only displays the information for the temp input and I need it to display both any advice?