updated folder structure
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
function saySomething(x) {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve('something' + x);
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
async function talk(x) {
|
||||
const words = await saySomething(x);
|
||||
console.log(words);
|
||||
}
|
||||
|
||||
talk(2);
|
||||
talk(4);
|
||||
talk(8);
|
||||
Reference in New Issue
Block a user