Hacker News new | past | comments | ask | show | jobs | submit login

The first line is a complete statement that finishes at the end of the line - unless there's an else clause in the following line (not counting comments or empty lines). Expressed another way:

  if (true) {
    something()
  }

  // Comment

  otherStatement()
If this last line started with "else", then the comment would be within the if statement.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: