Vidyalelo
JavaScript · Q45

Server

Programming · JavaScript · question 45

Q45

What is the code for getting the current time?

A.
now = new Date();
B.
var now = new Date();
Answer
C.
var now = Date();
D.
var now = new Date(current);

Answer: Option B

Solution

Answer: Option B
Solution:
The above code determines the current time and stores it in the variable “now”.