Hello, guys. I'm a new student in programming class. We're studying "if else functions" right now, and i've got a project to turn in soon. The objective is to be able to tell where i'm at, at a given time. Please look at my codes and help me in correcting it.
<html>
<head>
<font size= "100" font color= "green"> Where is Mishaal? </font>
<title>Mishaal Locator</title>
<body>
<script type= "text/javascript">
var d= new Date() ;
var time= d.getHours() ;
var minute= d.getMinutes() ;
if (time<=7 && minute>=35)
{
document.write("<b>Mishaal is in Fitness class</b>");
}
else if (time>= 8 && minute>=15)
{
document.write("<b> Mishaal is in the hall</b>");
}
if (time<=8 && minute>=20)
{
document.write("<b> Mishaal is in Arabic Class</b>");
}
else if (time>=9 && minute>=40)
{
document.write("<b> Mishaal is in the hall</b>");
}
if (time<=9 && minute>=50)
{
document.write("<b> Mishaal is in Biology Class </b>");
}
else if ( time>=11 && minute>=10)
{
document.write("<b> Mishaal is out for Lunch</b>");
}
if (time<=11 && minute>=50)
document.write("<b> Mishaal is in Spanish Class</b>");
{
else if (time>=13 && minute>=5)
document.write("<b> Mishaal is in the hall</b>");
}
if (time<=13 && minute>=15)
document.write("<b> Mishaal is in Programming</b>");
{
else (time>=14 && minute>=30)
document.write("<b> Mishaal's going home</b>");
}
</script>
</body>
</html>
thank you for your time.


Reply With Quote
Bookmarks