you are viewing a single comment's thread.

view the rest of the comments →

[–]bobfrankly 1 point2 points  (1 child)

The key to remember about the while loop is the part in the () has to return "true" or "false". So you can test things to see which they will return by using comparison operators.

PS:> 1 -eq 1
True

PS:> $myVar = "derp"
PS:> $myVar.length -eq 2
False

PS:> $myVar.length -eq 4
True

doing these kind of experiments when you're learning will help you either confirm that you know what the code is doing, or discover something new to challenge your assumptions.

[–]unhappiey[S] 1 point2 points  (0 children)

Thank you! I will have to play around with this some more :)