Javascript source from the date:

 

<SCRIPT LANGUAGE="Javascript"><!--                opening Javascript tag

// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.                        Java Script comments
// Download your FREE CGI/Perl Scripts toaceDay!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************

var aceDate=new Date()                            Variable named aceDate contains the Date method
var aceYear=aceDate.getYear()            Variable named aceYear contains Variable aceDate and Date method of year
if (aceYear < 1000)                               simple  if condition with comparison operator
aceYear+=1900                          assignment operation which means adding the value of right operand to the left one
var aceDay=aceDate.getDay()   Variable named aceDay contains the Variable aceDate and the Date method of Day
var aceMonth=aceDate.getMonth()+1  Variable named aceMonth....????? don't understand the +1 yet
if (aceMonth<10)                        simple if condition with comparison operator
aceMonth="0"+aceMonth            "0" here a literal...means if the month number is less than ten add a 0 in front
var aceDayMonth=aceDate.getDate() Variable called aceDayMonth contains the Variable aceDate and Date method
if (aceDayMonth<10)                    simple if condition with comparison operator
aceDayMonth="0"+aceDayMonth   "0" here a literal again
document.write("<font color='00ff00' face='Arial' size='2'><b>"+aceMonth+"/"+aceDayMonth+"/"+aceYear+"</b></font></small>")
above dot.syntax of the object document and the method write...then the html font tag then telling that there should be places on the screen the Variable aceMonth declared above, then the literal "/" which means there is a / after the month, then the Variable aceDayMonth, again the literal "/", then the Variable aceYear declared above, then the closing font tag
//--></SCRIPT>


Questions for the teacher!!

hmmmm I was wondering why there is no ; after the last )........???? is there only a ; if there are more lines to write?

I didnt really understand the var aceMonth=aceDate.getMonth()+1

 

also I didnt really understand this part of the year:

if (aceYear < 1000) aceYear+=1900

why stands here the number 1900 and not the number 2000????