JavaScript ASYNC/AWAIT is easy! ⏳

Published: 21 December 2023
on channel: Bro Code
83,038
2.2k

#javascript #tutorial #programming

// Async/Await = Async = makes a function return a promise
// Await = makes an async function wait for a promise

// Allows you write asynchronous code in a synchronous manner
// Async doesn't have resolve or reject parameters
// Everything after Await is placed in an event queue

async function doChores(){

try{
const walkDogResult = await walkDog();
console.log(walkDogResult);

const cleanKitchenResult = await cleanKitchen();
console.log(cleanKitchenResult);

const takeOutTrashResult = await takeOutTrash();
console.log(takeOutTrashResult);

console.log("You finsihed all the chores!");
}
catch(error){
console.error(error);
}
}

doChores();


On this page of the site you can watch the video online JavaScript ASYNC/AWAIT is easy! ⏳ with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 21 December 2023, share the link with friends and acquaintances, this video has already been watched 83,038 times on youtube and it was liked by 2.2 thousand viewers. Enjoy your viewing!