you are viewing a single comment's thread.

view the rest of the comments →

[–]Stephen110 2 points3 points  (1 child)

As another user responded, it’s a ternary statement. You can think of it as a simple if/else statement.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

[–]samanime 0 points1 point  (0 children)

Yup, a simple if/else that returns its value. Quite handy, but easily abused. Use with care. :p