cond ? expr : nothing # could be written as:
cond && expr
cond ? nothing : expr # becomes:
cond || exprfor i in testarray
if testarray > 0
do this
else
do nothing
for i in testarray
if testarray > 0
do this
else
do nothing
Sorry, not quite sure what the ? means -- does that mean 'or'? Also not sure about what you mean by the phrase ternary syntax.
testarray > 0 ? do_this() : do_that()x = condition ? value_if_true : value_if_false