Advertisement
areyesram

Untitled

Oct 28th, 2023
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const EASY = 0;
  2. const NORMAL = 1;
  3. const HARD = 2;
  4.  
  5. let life = {
  6.     difficulty: EASY,
  7.     live: () => (life.difficulty = HARD)
  8. };
  9.  
  10. async function main() {
  11.     life.live();
  12.     if (life.difficulty == HARD) {
  13.         adapt().then(overcome);
  14.     }
  15. }
  16.  
  17. async function adapt() {
  18.     console.log("adapt");
  19. }
  20.  
  21. function overcome() {
  22.     console.log("overcome");
  23. }
  24.  
  25. main();
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement