Question: Output in if statement

Just curious about an output in an if statement.

Why do I need to use Print() in an if statement, when I don't need it otherwise? Why doesn't "hei" show in the output of the attached example?

Printinloop.mw

Please Wait...