JavaScript Tutorial - 4 - a possible answer to Task 9 <html> <head> <title>Weekend?</title> </head> <body> <script> document.write("<font size=5 color=blue>") document.write("<b>") var now=new Date() var day=now.getDay() var s="I'm looking forward to the weekend!" if (day==0) { s="Hey! It's the Weekend!" } if (day==6) { s="Hey! It's the Weekend!" } document.write(s) document.write("</b>") document.write("</font>") </script> </body> </html>

HOME Table of Contents