In the scenario where the else statement is blank, is it's inclusion necessary? IE:
if (condition) {
function
}
else {}
or
if (condition) {
function
}
In the scenario where the else statement is blank, is it's inclusion necessary? IE:
if (condition) {
function
}
else {}
or
if (condition) {
function
}
The inclusion of the else
statement is not necessary.
if (condition) {
function();
}
is enough.