new Date():
Its a object in java script that is used create the new object in js.The data object represents a single moment in time.
getHours():
This method is used to get the hour of the day from a Date object.The value returned from the getHours() function is in 24 hours format.
getSecond():
This is used to get the specific second from the date object.It returned the 0 to 59 integer value representing the second of the minute
setInterval():
It is a function that calls the specified function at the fixed interval.It is useful for executing tasks at regular interval of time.
Top comments (0)