I just want to add 45 months to the given date in JavaScript. I have tried this:
var startDateFormat = new Date(2018, 11, 24); // 11 is for January starts from 0
var addDate = startDateFormat.setMonth(startDateFormat.getMonth() + 45); //want to add 45 months
console.log(new Date(addDate).getFullYear() + "-" + new Date(addDate).getMonth() + 1 + "-" + new Date(addDate).getUTCDate())
But the result is 2019-101-23. Can anybody help me why this is happening?