Is it o'key to write else statement before if?
Which is good?
var1 = 10;
if (condition == true) {
var1 = 20;
}
or
if (condition == true) {
var1 = 20;
} else {
var1 = 10;
}
Which is good?
var1 = 10;
if (condition == true) {
var1 = 20;
}
or
if (condition == true) {
var1 = 20;
} else {
var1 = 10;
}