2023-02-26 01:30

This commit is contained in:
2023-02-26 01:30:37 +09:00
commit 9a13ccbd17
122 changed files with 32148 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
let fun1 = async function () {
let someJobIsDone = true;
let i = 0;
while (i < 100000000) {
i++;
}
return new Promise((resolve, reject) => {
if (someJobIsDone) {
resolve('ok');
} else {
reject('bad');
}
});
};
fun1()
.then(msg => console.log(msg))
.catch(err => console.error(err));
console.log("Hi");