Is there any way to provide automatic stop the while loop? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is there any way to provide automatic stop the while loop?

I mean when loop is executed until 20 sec, it automatically break. Any ideas JS freaks? :)

5th Jul 2016, 6:01 PM
kaco
2 Answers
+ 2
you will need to set a var = current time. not positive exactly what it is, maybe System.Time. or something close. and then use that variable as part of you comparison for the whole loop condition.
21st Jul 2016, 2:03 AM
Eric wright
Eric wright - avatar
0
Yea...
7th Jul 2016, 4:02 AM
Corrupted_XYZ
Corrupted_XYZ - avatar