catch() methods.Įrror handling is done using. If the function “fxn1” is to executed after await, then await X() suspends execution of the current function and then fxn1 is executed.Įrror handling is done using. If the function “fxn1” is to executed after the promise, then promise.then(fxn1) continues execution of the current function after adding the fxn1 call to the callback chain. It returns a promise either resolved or rejected. Promise has 3 states – resolved, rejected and pending. Promise is an object representing intermediate state of operation which is guaranteed to complete its execution at some point in future.Īsync/Await is a syntactic sugar for promises, a wrapper making the code execute more synchronously.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |