While Loops | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

While Loops

In the sample code, why there is "while 1==1" ?? Help me please! Thanks

20th Feb 2017, 1:01 AM
Alireza Faraji
Alireza Faraji - avatar
2 Answers
+ 4
It makes an infinite loop. 1==1 just means True. Therefore, it is the same as "while True". Now, why the sample code is written like that, I do not know. Please post link or reference to the sample code.
20th Feb 2017, 1:15 AM
Jehad Al-Ansari
Jehad Al-Ansari - avatar
0
Thanks bro!
20th Feb 2017, 1:16 AM
Alireza Faraji
Alireza Faraji - avatar