```js
const date = new Date()
date.setMonth(date.getMonth() + 1)
date.setDate(0)
console.log(date)
```
为什么不是 2022/08/31? #冷知识精选#
const date = new Date()
date.setMonth(date.getMonth() + 1)
date.setDate(0)
console.log(date)
```
为什么不是 2022/08/31? #冷知识精选#
展开
1
2