SHARE
TWEET

Untitled

a guest Jul 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function faireFondations(done) {
  2.   console.log("Fondation commencée");
  3.   setTimeout(() => {
  4.     console.log("Fondation terminée");
  5.     done();
  6.   }, 2000);
  7. }
  8.  
  9. function faireMurs(done) {
  10.   console.log("Mur commencé");
  11.   setTimeout(() => {
  12.     console.log("Mur terminé");
  13.     done();
  14.   }, 1000);
  15. }
  16.  
  17. function faireToit() {
  18.   console.log("Toit commencé");
  19.   setTimeout(() => {
  20.     console.log("Toit terminé");
  21.   }, 3000);
  22. }
  23.  
  24. function faireMaisonSync() {
  25.   faireFondations(() => faireMurs(() => faireToit()));
  26. }
  27.  
  28. faireMaisonSync();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top