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

Re: /*jslint */ and function scope

Expand Messages
  • Woomla
    Great! Many thanks. No need to do something alike myself anymore :-)
    Message 1 of 2 , Mar 7, 2011
    • 0 Attachment
      Great! Many thanks. No need to do something alike myself anymore :-)

      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      >
      > The /*jslint */ directive now respects function scope. That means that if you change an option setting inside of a function body, it will revert on leaving the function body.
      >
      > In this example, there is no warning for and, but there is a warning for nuther.
      >
      > ` /*jslint bitwise: true */
      > `
      > ` function and(a, b) {
      > ` /*jslint bitwise: false */
      > ` return a & b;
      > ` }
      > `
      > ` function nuther(a, b) {
      > ` return a & b;
      > ` }
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.