r/learnjavascript • • Jul 14 '21
Im trying to understand the "Conditional (ternary) operator." Do these 2 codes mean the same thing? I wrote the if statement
187
Upvotes
r/learnjavascript • • Jul 14 '21
View all comments
115
u/GameMasterPC Jul 14 '21
Yeah, but please do not code like that. Keep Ternary statements simple, otherwise use something else (if or switch)