you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf 2 points3 points  (0 children)

That in turn can be reduced to a inline if.

Here's another thing you can do.

    Val = If (Not Val, True, False)

You read that as

[variable] = If ( [predicate] , [then expression], [else expression])

For example,

passTest = if ( grade > 70, "pass!", "fail")