There's nothing more beautiful than a well executed ternary expression.
It becomes especially useful when working with templates where you want a simple inline way of switching between behaviors or components.
If you'd like some more things to look into, thing about what happens when you use logical operators (&&, ||) to determine what parts of code run (also super useful when templating, but also for providing defaults like const x = someParameter || 'defaultString').
const x = someParameter || 'defaultString'
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.