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

1095Re: [jslint] Why isn't !! OK?

Expand Messages
  • iain_dalton
    Feb 1, 2010
    • 0 Attachment
      > It doesn't emit this error for the following code:
      >
      > /*global b*/
      > var a = !!b;
      >
      > Do you have a code snippet illustrating your problem?

      Sure:

      var launchIsKeyCode = this.prefs.getBoolPref(this.kbLaunchNames.userIsKeyCode);
      var charCode = event.charCode;
      if ((!!charCode) === launchIsKeyCode) {
      return;
      }
    • Show all 6 messages in this topic