Jump to content

Trying To Learn Javascript


Recommended Posts

I was following the tutorial on W3Schools for javascript and got a little side tracked and started messing around with the code so I could figure it out. It stopped working and I don't know what I changed. It doesn't matter a whole lot but it is hard to learn when I don't know what I'm doing wrong. here is my script:<html><body><script type="text/javascript">var date = new Date();var time = d.getHours();var min = d.getMinutes();if (time > 0 && time < 10) { document.write("<b>Good Morning</b>"); }else (time > 10 && time < 17) { document.write("<b>Good Afternoon</b>"); }else (time > 17 && time < 24) { document.write("<b>Good Evening</b>"); }//Display Timedocument.write("<br>Current Time ");document.write(time);document.write(":");document.write(min);document.write("<br>");document.wriet(date);</script></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...