When are braces optional or necessary in conditional statements?
Answers
Answered by
2
Explanation:
Braces { } not required for one statement (but are always good) If the true or false clause of an if statement has only one statement, you do not need to use braces (also called "curly brackets"). This braceless style is dangerous, and most style guides recommend always using them.
Answered by
1
Braces { } not required for one statement (but are always good) If the true or false clause of an if statement has only one statement, you do not need to use braces (also called "curly brackets"). This braceless style is dangerous, and most style guides recommend always using them.
Similar questions