Advertisement
honghoavi

Conditional statements if-else-switch 03

Jun 28th, 2012
1,821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript"><!--
  2. var d = new Date();
  3. var day = d.getDay();
  4.  
  5. switch(day) {
  6.  case 5:
  7.    document.write("Today is friday");
  8.  case 6:
  9.    document.write("Today is saturday");
  10.  case 0:
  11.    document.write("Today is sunday");
  12.  default:
  13.    document.write("There is a lot until saturday");
  14. }
  15. --></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement