Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's definitely nice to see the return at the beginning of the line -- makes the code easier to scan.

And anytime there's code after a return, it had better be connected to a conditional. :)



Those are good points. I'd probably make it multi-line:

    if badness
      throw 'error'
    
    unless goodness
      return null




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

Search: