It is recommended that you always use the curly brackets ({ and }) in the if, switch, while, do while, for and function statements. If you have just one statement inside the curly brackets, they are optional, but it is recommended that you make it a rule to always use them, limiting the possibility of making mistakes.
Example:
if(condition)
<statement1>;
is the same as
if(condition)
{
<statement1>;
}
so you may find it convenient to drop the curly brackets. But you may soon need to add another statement. If you add it like this:
if(condition)
<statement1>;
<statement2>;
or
if(condition)
<statement1>; <statement2>;
it will be equivalent to
if(condition)
{
<statement1>;
}
<statement2>;
This will be very different from
if(condition)
{
<statement1>;
<statement2>;
}