Created
June 5, 2021 14:32
-
-
Save bhushan/db5002cf0d7edbc4248c0bc446306fad to your computer and use it in GitHub Desktop.
A question for the readers?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What will be the output of this program? | |
console.log("Start"); | |
setTimeout(() => { | |
console.log("inside setTimeout"); | |
}, 3000); | |
console.log("End"); | |
let startDate = new Date().getTime(); | |
let endDate = startDate; | |
while (endDate < startDate + 10000) { | |
endDate = new Date().getTime(); | |
} | |
console.log("While ends"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment