How should one comment an if-else structure? [duplicate]

If it is needed to comment if else statements, I prefer to describe the case what made the code reach that point.
Especially in code with a high cyclomatic complexity

if (condition) { 
// User is taking a course at college x:
    i = 1;
} else { 
// User is not taking any course at college x:
    i = 2;
}

Leave a Comment