Can someone tell me what this code is doing, from the "for" statement down.
birthdayarray = new Array(12);
birthdayarray[0] = "January";
birthdayarray[1] = "January";
birthdayarray[2] = "February";
birthdayarray[3] = "March";
birthdayarray[4] = "April";
birthdayarray[5] = "May";
birthdayarray[6] = "June";
birthdayarray[7] = "July";
birthdayarray[8] = "August";
birthdayarray[9] = "September";
birthdayarray[10] = "October";
birthdayarray[11] = "November";
birthdayarray[12] = "December";
var searchstring = prompt("What number of month were you born in?",""
for (m=0; m<birthdayarray.length; m++){
alert(m);
if (birthdayarray[m].search(searchstring) != -1){
alert("You were born in "+birthdayarray[m]+", which is month "+m+" out of 12."
}
}
birthdayarray = new Array(12);
birthdayarray[0] = "January";
birthdayarray[1] = "January";
birthdayarray[2] = "February";
birthdayarray[3] = "March";
birthdayarray[4] = "April";
birthdayarray[5] = "May";
birthdayarray[6] = "June";
birthdayarray[7] = "July";
birthdayarray[8] = "August";
birthdayarray[9] = "September";
birthdayarray[10] = "October";
birthdayarray[11] = "November";
birthdayarray[12] = "December";
var searchstring = prompt("What number of month were you born in?",""
for (m=0; m<birthdayarray.length; m++){
alert(m);
if (birthdayarray[m].search(searchstring) != -1){
alert("You were born in "+birthdayarray[m]+", which is month "+m+" out of 12."
}
}