Must I always surround a code block in a control statement with brackets?
If the code you want executed as part of a control structure consists of only a single line, you can omit the brackets. Retaining the brackets for single-line control statements can also help guard against bugs as new lines are added to the block over time.
Leave a Reply
You must be logged in to post a comment.