I have a problem where i need to iterate been two different numbers or years. So for example. My start year is 1993 and my end year is 2014. How do i print out the year for year in between starting at 1993 and ending at 2014? Also for each year printed i need to add it to an array.
My assumption was to use a While loop like
var myYear = [];
var theYear;
while(startyear <= endYear){
myYear.push(startyear)
startyear++
}
You need to declare and initialize your variables.
Like this: