My IsLowerCase() (different than the lesson says but works)

So I started working on this and when I watched the solution I found out that I had basically the other way around.
My question is: Is this code OK or does it absolutely need to be the one from the lessons?

Thanks in advance

No this won’t work because a return will exit the loop, so if the first letter is lowercase then the loop will exit without checking the other letters. You can do it the other way round because as soon as you have found one uppercase letter then it doesn’t matter how many more there are, since you already determined the entire word is not lowercase.

Privacy & Terms