Answers for "await async iife javascript"

0

await async iife javascript

const timeouttt = () => {
    return new Promise(resolve => {
        setTimeout(() => {
            console.log('hey');
            resolve('heyyy');
        }, 1000);
    });
};
const hello5 = async () => {
    console.log('hi iqbal');
    let y = await (async function () {
        let x = await timeouttt();
        console.log(x);
        console.log('hola');
        return 5;
    })();
    console.log(y);
    console.log('vola');
};

hello5()
Posted by: Guest on September-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language