Kategoriarkiv: if

Inline if-statement

I always forget that you can write inline if-statements like this. Nice to have a reminder. =)

The variable myVariable will get the true value if the condition returns true, or false value if the condition returns false.

Example:

This will give the myString variable the “This is true” value.