Can any one help me to find first date and last date from month and year.
I have 2 parameter month and year, for example month = 10 and year = 2021

I tried some code but it doesn't have the answer

```
var prevMonthLastDay = new Date(2021, 10, 0);
var thisMonthFirstDay = new Date(2021, 10, 1);
console.log(prevMonthLastDay);
console.log(thisMonthFirstDay);

```

Above code is giving following output:

```
2021-10-30T17:00:00.000Z
2021-10-31T17:00:00.000Z 

```

My expected answer is first date `2021-10-01` and last date `2021-10-31`