zr_test_demo_d
v1.0.1
Published
```javascript function say(val, time) { return new Promise((resolve, reject) => { setTimeout(() => { console.log(val) resolve(); }, time); }) } async function fn() { await say(1, 1000); aw
Readme
function say(val, time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log(val)
resolve();
}, time);
})
}
async function fn() {
await say(1, 1000);
await say(2, 2000);
await say(3, 3000);
await say(4, 4000);
await say(5, 5000);
}
fn();