Answers for "call function after 1 hour javascript"

2

javascript after time call function

/*
You can use JavaScript Timing Events to call function after certain interval of time:

This shows the alert box every 3 seconds:
*/

setInterval(function() {alert("Hello")},3000);

/*
1. setInterval(): executes a function, over and over again, at specified time intervals
2. setTimeout() : executes a function, once, after waiting a specified number of milliseconds
*/
Posted by: Guest on April-27-2021
4

javascript get 1 hour from now

Date.prototype.addHours = function(h) {
  this.setTime(this.getTime() + (h*60*60*1000));
  return this;
}
Posted by: Guest on February-27-2020

Code answers related to "call function after 1 hour javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language