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

Re: typeof and delete operators - can i use parens?

Expand Messages
  • Douglas Crockford
    ... delete and typeof are operators, not functions, they are operators. Dressing them as functions is a confusion.
    Message 1 of 2 , Jan 24, 2011
    View Source
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Jordan" <ljharb@...> wrote:
      >
      > Before the recent changes, JSLint accepted `typeof(variable)` and `delete(object.property)` in lieu of `typeof variable` and `delete object.property`. To me, using the parens is more explicit, and thus a better practice.
      >
      > Now, however, JSLint requires that there be exactly one space between `typeof` and `delete` and the variables upon which they operate.
      >
      > Should JSLint tolerate the parens usage, or should I change my code to use the space? If the latter, is there an option to tolerate that usage?


      delete and typeof are operators, not functions, they are operators. Dressing them as functions is a confusion.
    Your message has been successfully submitted and would be delivered to recipients shortly.