1.

What is the code for getting the current time?(a) now = new Date();(b) var now = new Date();(c) var now = Date();(d) var now = new Date(current);

Answer» Correct answer is (b) var now = new Date();

To explain I would say: Date() is a predefined function in javascript which returns the date in string form. The above code determines the current time and stores it in the variable “now”.


Discussion

No Comment Found

Related InterviewSolutions