Having trouble getting a date

Someone tell me where I’m going wrong. I’m trying to print out the month/year ?

<SCRIPT language=JavaScript>
var dateNow = new Date();
var monthNow = dateNow.getMonth();
var yearNow = dateNow.getYear();
function MakeArray(n) {
this.length = n
return this
monthNames = new MakeArray(12)
monthNames[1] = "Janurary"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames[5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "Sept."
monthNames[10] = "Oct."
monthNames[11] = "Nov."
monthNames[12] = "Dec."
function customDate(oneDate) {
var theMonth = monthNames[oneDate.getMonth() +1]
</head><body><script type="text/javascript">
document.write(theMonth + "/" + yearNow);

You should be using getFullYear instead of getYear because getYear has a Y2K bug and will display 110 in some browsers.

Also why have a blank entry at the front of the array and have to add one to the month to find the right entry. Simpy assign

var monthnames = [‘January’,‘February’, …

and get rid of the +1.

got it