setTime()By using a date object we can set time to any value by using setTime property this format
All above inputs are in integer. Here are some examples.
The output is here We can change the setTime to different values and output will change like this . output is here
Procedural style
In the above code check how the hour has changed the day by adding one.
This article is written by plus2net.com team.
![]() |