Is there another way to produce this array with code that does not use the range method?
Here is and example of what im looking for but using the range method.
const years = range(1990, getYear(new Date()) + 1, 1);
Yes you can achieve this by writing your own function
const generateDates = (startYear) => {
let currentYear = new Date().getFullYear(), years = [];
startYear = startYear || 1980;
while ( startYear <= currentYear ) {
years.push(startYear++);
}
return years;
}
console.log( generateDates(2019-20));