Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. What is the code for getting the current time?

  2. A.

     now = new Date();

    B.

     var now = new Date();

    C.

     var now = Date();

    D.

     var now = new Date(current);

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The above code determines the current time and stores it in the variable “now”.


Be The First To Comment