Ask coding questions

← Back to all posts
Improper ternary?
reifnotreef (0)

On line 3 I use a ternary operator but don't really have an 'else'
Is this improper to do?
Haven't used a ternary for a while and was seeing if it would work.

mwilki7 (794)

did u try putting parentheses around the expression?