DEV Community

Discussion on: Writing If Statements with the Ternary Operator

Collapse
 
valentinaperic profile image
Valentina Peric

Yes, you could remove the operand altogether if you wanted to further refactor and simplify the code! This is great. I wanted to show an example that was explicit in the truthy expression and falsy expression. Thanks for the input, Jing 🙂