Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const EASY = 0;
- const NORMAL = 1;
- const HARD = 2;
- let life = {
- difficulty: EASY,
- live: () => (life.difficulty = HARD)
- };
- async function main() {
- life.live();
- if (life.difficulty == HARD) {
- adapt().then(overcome);
- }
- }
- async function adapt() {
- console.log("adapt");
- }
- function overcome() {
- console.log("overcome");
- }
- main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement