let count = 1
let wait = new Promise(resolve => {
setTimeout(() => {
resolve(count++)
}, 1000)
})
const fn = () => {
return wait.then(console.log)
}
fn()
.then(fn)
.then(fn)
提示一下:wait 不是一个工厂函数哟。
let count = 1
let wait = new Promise(resolve => {
setTimeout(() => {
resolve(count++)
}, 1000)
})
const fn = () => {
return wait.then(console.log)
}
fn()
.then(fn)
.then(fn)
提示一下:wait 不是一个工厂函数哟。