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>
  1. Tue Dec 21 2021 13:04:36 GMT+0530
  2. Tue Dec 21 2021 13:04:36 (India Standard Time)
  3. Tue Dec 21 2021 13:04:36::00::01 GMT+0530 (India Standard Time)
  4. 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).

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.