Ask coding questions

← Back to all posts
Improper ternary?
reifnotreef

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.

Voters
jatinsoni2
reifnotreef
Comments
hotnewtop
mwilki7

did u try putting parentheses around the expression?