Is there a way i can include the break statement in a ternary operator in this scenario?
I am trying to replace the if… else inside a loop for a ternary operator. I stated my condition and wrote the code to run but after i thought, and included a
break keyword or statement ( i don’t know what it’s called…with semi-colon though) i got an error even after providing the else part. I would have to remove the break statement before the code will be valid.
Also, how can i successfully skip an else part of a ternary operator - just like if without an else? I have searched for that thread on stackoverflow, but i am not understanding what the solution was – a newbie
Sorry i am not providing a code snippet, but i think i am explained well enough.