+ 1

Does "setinterval" make the event occur periodically?

22nd Feb 2016, 2:34 PM
Souhayel Abassi
Souhayel Abassi - avatar
3 Respostas
+ 1
I think it does. in other languages a while loop is used for this behavior. but it looks like in JavaScript the behavior continues until it's cleared.
5th Mar 2016, 9:01 AM
Jesus Chavez
Jesus Chavez - avatar
+ 1
yes it does. whatever value you pass as the second argument will be your period (in milliseconds)
19th Jun 2016, 1:31 AM
Axle
+ 1
Take a look at this example I did so you can have a better understanding of setInterval: https://code.sololearn.com/WtWo50WAHrTt/#js
10th Aug 2017, 10:46 PM
Juan F R G
Juan F R G - avatar