Quote (Comc @ Feb 16 2017 02:19am)
Also, you should be using "==" for equality testing. You're just reassigning the variable month in every if statement, which happens to work since you're just printing all the seasons in sequence anyway. Note that the while loop only ever executes once since month is already 12 after the first iteration.
<br/><script>
var month = 1;
while(month<13){
if(month < 3){
document.write("Winter<br>");
}else if(month < 6){
document.write("Spring<br>");
}else if(month < 9){
document.write("Summer<br>");
}else if(month <12){
document.write("Fall<br>");
}else {
document.write("Winter<br>");
}//end of if - display greeting
month = month + 1;
}//End while loop
</script>
I ended up figuring it out, but I appreciate the reply. Sent you a small token of my appreciation