DEV Community

Discussion on: JavaScript Ternary Operator

Collapse
 
lorenzojkrl profile image
Lorenzo Zarantonello

Yes usually yes! That is a good practice to maintain some clarity.
I often end up calling some functions or passing some variables instead of having simple expressions/strings.

I added an example with some functions here: medium.com/@lorenzozar/javascript-...