If you tried Google you would find many explanations. Such as
Or you could simply try it yourself:-
var now = new Date();
This creates a new Date object named now.
Note: The Date object will automatically hold the current date and time as its initial value.
That object can be further interrogated. e.g:
var hours = now.getHours();
var minutes = now.getMinutes();