Advertisement
Guest User

Untitled

a guest
Dec 17th, 2023
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function the_fetch3(){ setTimeout(the_fetch2,3000);}
  2. function the_fetch3() {
  3.   setTimeout(the_fetch2, 3000);
  4. }
  5.  
  6. async function myDisplay() {
  7.   let myPromise = new Promise(function(resolve) {
  8.     setTimeout(function() {
  9.       the_fetch3();
  10.       resolve(alert('affichage pret'));
  11.     }, 3000);
  12.   });
  13.   document.getElementById("demo").innerHTML = await myPromise;
  14. }
  15.  
  16. myDisplay();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement