News for hackers. Stuff that matters.
Re:Why are programmers afraid of not using semicolons in Jav... by snorkel on Monday August 08, 2011 @09:08AM (#2859908)
It is ambiguous when the coder intended to return directly without returning any value like so:

    while (word = getNextWord()) {
      doSomething(word)
      if (i > limit) return
      i++
    } 
Sure, this can be written better but a semi-colon after "return" makes it less ambiguous.

There are no comments on this comment yet.