logo
Ryan's Webpage
 

manyTemps

manyTemps


Hit reload to see another temperature

<html>
<head>
<title>manyTemps</title>
<script>
// by Ryan Te
// 10/2/07
// Demonstates the if/else structure

var temp = 0;

temp = Math.floor(Math.random() * 100) + 1;
alert ("It's " + temp + " degrees outside. ");

if (temp < 70){

if (temp < 30){
alert("Wear a jacket!!");
} else {
alert("Wear a sweater!!");
} //end 30 if
} else {
if (temp > 85){
alert("Wear a bathing suit!!");
} else {
alert("Wear short sleeves");
} // end 85 if
} // end 70 if

</script>
</head>

<body>
<center><center>
<h1>manyTemps<br></h1>
</center>
<hr>
<h3>Hit reload to see another temperature</h3>
</body>
</html>

 

 

Contact Me

 

Mr. Styner's Webpage

 

Peter

Julie

Nick

Tiddus

Norman