如何使用moment.js获取从当前月份到过去一个月的所有月份的列表

I'm trying to generate a list of months starting from April 2020 to a month in the past ( October 2019 ) using moment.js.

const start = moment().startOf('month')
const startMonth = moment('10-01-2018', 'MM-DD-YYYY').format('MMMM YYYY')
const month = moment().startOf('month').format('MM')
for (let i = 0; i < month; i++) {
  const m = start.subtract(1, 'month').format('MMMM YYYY')
  if (m === startMonth) {
    break;
  }
  console.log(m)
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.26.0/moment.min.js" integrity="sha256-5oApc/wMda1ntIEK4qoWJ4YItnV4fBHMwywunj8gPqc=" crossorigin="anonymous"></script>

结果我只有5个月的时间。谁能帮忙吗?