This not a MooTools but just a general JavaScript question.
I was just curious about the usage of the { in if statements.
Given the 2 blocks below:
if (variable == 'value')
doonestatement;
OR
if (variable == 'value') {
doonestatement;
}
Is there any benefit to putting the { around the statement to execute if
there is only one statement to execute? I have seen code both ways, where
there is never a { if there is only one statement and code where there is a
{ no matter how many statements there are to execute after an if statement.
Is it just a matter of personal preference or does it provide a speed
performance or is there other reasons?