How to execute a function after some time javascript -
i want write javascript code can excute function after 30 minutes.
say have function called getscore , function called getresult. want functions executed after 30 minutes.
it's quiz purpose, quiz duration 30 minutes, after time passes,both functions should executed.
you should use settimeout():
settimeout(function() { getscore(); getresult(); }, 1800000); the '1800000' time in milliseconds after want function execute. in case, 30 minutes.
Comments
Post a Comment