Last day of month

Report a typo

function getLastDayOfMonth(inputDate: Date): number {
    const lastDay = new Date(inputDate.getFullYear(), inputDate.getMonth() + 1, 0);
    return lastDay;
}

Which of the following statements is true regarding the provided code?

Select one option from the list
___

Create a free account to access the full topic