Home »
MCQs »
JavaScript MCQs
What is the output of the following JavaScript code? | Question 20
73. What will be the output of the following JavaScript code?
<script>
const curr = new Date();
document.write(curr);
</script>
- Tue Dec 21 2021 13:04:36 GMT+0530
- Tue Dec 21 2021 13:04:36 (India Standard Time)
- Tue Dec 21 2021 13:04:36::00::01 GMT+0530 (India Standard Time)
- Tue Dec 21 2021 13:04:36 GMT+0530 (India Standard Time)
Answer: D) Tue Dec 21 2021 13:04:36 GMT+0530 (India Standard Time)
Explanation:
The above JavaScript code will print the current date & time in the format of Tue Dec 21 2021 13:04:36 GMT+0530 (India Standard Time).