If you use the break statement will it break all if…else…if else statements and all loops? If so how can you break just a single if/loop.
while(test here){if({break;}don't break;)}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
breakstatement will only break out of the one loop in that you put it in. It doesn’t affect if/else statements. If you want to break an outer loop you can use labels, as in this answer.