What does the function SetInterval(function_name, milliseconds_timer) return ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does the function SetInterval(function_name, milliseconds_timer) return ??

We call the function SetInterval like var t= SetInterval (function_name, milliseconds_timer) ; What is the value present in t ??

10th Jun 2019, 11:30 AM
Ak 👩‍💻 💻
Ak 👩‍💻 💻 - avatar
2 Answers
+ 7
It returns an identifier of the timer, it's keeping all times in an array and returns the indices, you can use that number to clear the interval. clearInterval(5); //example
10th Jun 2019, 12:51 PM
Valen.H. ~
Valen.H. ~ - avatar
0
It works the same way whether we declare a variable t or not !!!!!!!
7th Oct 2019, 4:06 PM
Azhar Shujaadiin
Azhar Shujaadiin - avatar