Loading ...
Sorry, an error occurred while loading the content.

1201Re: [jslint] Function return with and without value does not give any warning

Expand Messages
  • Mark Volkmann
    Mar 5, 2010
    • 0 Attachment
      It could be a function that doesn't return anything and return is being used
      just to exit the function early. In that case using return without a value
      makes sense.

      On Fri, Mar 5, 2010 at 8:24 AM, Woomla <woomla@...> wrote:

      >
      >
      > The code snippet below doesn't give any errors or warnings. But return with
      > and without a value is used. Shouldn't that at least issue a warning?
      >
      > "use strict";
      >
      > function test(a, b)
      > {
      > if (a)
      > {
      > return true;
      > }
      > if (b)
      > {
      > return;
      > }
      > }
      >

      --
      R. Mark Volkmann
      Object Computing, Inc.


      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic