But what about while loops that don't use the while-true statement?
while(condition){
do something;
}
for(;condition;){
do something;
}
See? There is absolutely no reason to use while loops.
I urge you all to stop using this redundant function and instead switch to a much simpler style of coding that only has one loop, the for loop that will always be dominant!
FOR LOOPS FOREVER!
Unless you use Python. Then you suckyou are unculturedyou should stop using python while loops are useful.
That is how to properly replace while loops with for loops. Also who really cares about code looking pretty? If it works it works sorry competitive programmer here, and this is somewhat of a joke post.
Forgo the usage of while loops
While loops have grown to become a staple ingredient in our codes. We use it for a lot of purposes.
Some Common Uses Of While Loops
It has a lot of uses.
But, we also have the for loop.
It does the exact same thing.
Allow me to demonstrate.
Output:
But this code does the exact same thing with a for loop.
But what about while loops that don't use the while-true statement?
See? There is absolutely no reason to use while loops.
I urge you all to stop using this redundant function and instead switch to a much simpler style of coding that only has one loop, the for loop that will always be dominant!
FOR LOOPS FOREVER!
Unless you use Python. Then
you suckyou are unculturedyou should stop using pythonwhile loops are useful.no
that is completely false
which one looks better?
also,
for
loops literally are while loops in the backend (meaning they are just syntactic sugar)@Coder100 smh
That is how to properly replace while loops with for loops.
Also who really cares about code looking pretty? If it works it workssorry competitive programmer here, and this is somewhat of a joke post.no, that isn't it,
for
loops desugar to@FlaminHotValdez
@Coder100 yes I know, this is somewhat of a joke post, its rly just your opinion.
well i just made one too bruhh @FlaminHotValdez
https://repl.it/talk/learn/How-to-fix-ANY-bug-works-2021/116336 @FlaminHotValdez