Filling an array with numbers in a calendar in JavaScript

Let's start by making a function that will accept an integer as a parameter and create an array of numbers from 1 to this number:

javascriptfunction range(count) {
  
}

We also need a function that will return the number of the month last day:

javascriptfunction getLastDay(year, month) {
  
}
Задание 1

Implement the specified above functions and output to the console an array from 1 to the last day of the month.