IF Statements: The Ultimate Game of "Maybe, Possibly, Possibly Not"

You can't use an if statement inside a loop because, well, you're trying too hard, buddy.

Think of it like a never-ending cycle of "Maybe, Possibly, Possibly Not" - it's like trying to have a rational conversation with a teenager.

Instead, you'll get something like this:

      while(true) {
        if(condition) {
          // Maybe, possibly, possibly not do something here
          // Possibly do something else
          // Possibly, probably not, definitely not do nothing
        }
      }
    

Which is just a big mess of "Maybe, Possibly, Possibly Not" and will drive you crazy.

So, what's the solution?

Use a For Loop, man. They're like the responsible, grown-up cousin of the If Statement. They don't get all emotional and dramatic.

Just stick to the plan, and don't try to "Maybe, Possibly, Possibly Not" your way through it.

Learn more about For Loops

Or, if you insist on being dramatic, here's a link to the Else If Statement