Timer Methods in Javascript | setTimeout() | setInterval() & clearInterval() | INIT Tech Labs

Pubblicato il: 23 maggio 2024
sul canale di: INIT Tech Labs
53
6

Javascript's window object offers 2 timer based methods - setTimeout() & setInterval().

setTimeout() is used to execute code after a specific time. You can configure a timeout for the code execution.
Syntax : setTimeout( function, time in milliseconds)

setInterval() is used to execute code on regular intervals of time. The code will keep executing after a time interval.
Syntax : setInterval( function, time in milliseconds)

clearInterval() is used to clear/stop the setInterval(). To stop an interval, pass the instance of the setInterval() as an argument.
Syntax : clearInterval( instance of setInterval() )

.
.
.
#inittechlabs #programming #codewithdj #nirmaljoshi #javascript #knowledgesharing


In questa pagina del sito puoi guardare il video online Timer Methods in Javascript | setTimeout() | setInterval() & clearInterval() | INIT Tech Labs della durata di ore minuti seconda in buona qualità , che l'utente ha caricato INIT Tech Labs 23 maggio 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 53 volte e gli è piaciuto 6 spettatori. Buona visione!