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

330Re: [jslint] Re: var a = var b = foo();

Expand Messages
  • mnewton32@yahoo.ca
    Dec 16, 2008
    • 0 Attachment
      I believe the var declaration is not legal as the right side of a statement; it would require 'var b' to return a value, which it does not. Try:
      var a, b;
      a = b = foo();

      Sent from my BlackBerry device on the Rogers Wireless Network

      -----Original Message-----
      From: "Douglas Crockford" <douglas@...>

      Date: Tue, 16 Dec 2008 15:00:28
      To: <jslint_com@yahoogroups.com>
      Subject: [jslint] Re: var a = var b = foo();

      --- In jslint_com@yahoogroups.com, "Daniel Cassidy" <mail@...> wrote:
      > JSLint forbids the following form:
      > var a = var b = foo(); // Expected an identifier and instead saw 'var'.
      > Is this intentional?

      Of course.

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