What is the code for getting the current time?
What is the code for getting the current time? Correct Answer var now = new Date();
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”.