Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fadeOutBox();
- fadeInInfoBlock();
- async function runInOrder(){
- await fadeOutBox();
- await fadeInInfoBlock();
- }
- function fadeOutBox() {
- // do stuff
- fadeInInfoBlock()
- }
- fadeOutBox()
- function fadeOutBox(){
- return new Promise(function(resolve, reject) {
- //True statement
- resolve('true')
- });
- }
- fadeOutBox.then(function(value) {
- console.log(value);
- fadeInInfoBlock();
- })
- async function syncFn(){
- await fadeOutBox();
- await fadeInInfoBlock();
- }
Add Comment
Please, Sign In to add comment