Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log("This is the first line of code in app.js.");
- // Keep the line above as the first line of code
- // Write your code here:
- const usingSTO = () => {
- console.log("Today is a happy day!"); //this line will be printed last in the output because of the delay
- };
- setTimeout(usingSTO, 2500); //pass usingSTO() without invoking it
- // Keep the line below as the last line of code:
- console.log("This is the last line of code in app.js.");
- /*
- Output will show:
- $ node app.js
- This is the first line of code in app.js.
- This is the last line of code in app.js.
- Today is a happy day!
- $
- */
Add Comment
Please, Sign In to add comment