4 ms·
Yup, I always do this when writing JavaScript or other languages that allow prefix single statements with or without braces. Otherwise I use braces if the state
by petre 10y ago
Yup, I always do this when writing JavaScript or other languages that allow prefix single statements with or without braces. Otherwise I use braces if the statement is too long to fit in the editor w/o forcing you to scroll. Perl only allows postfixed single statements w/o braces, so you're safe:
say "yes" if $condition;
if ($condition) {
say "yes";
$affirmative++;
}