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

2985Re: [jslint] Array construction bug

Expand Messages
  • IcedNet Development Team
    Aug 31, 2012
      You may not code for "noobs", but you will have new hires, and you will document that one-liner or have to explain it, even to professionals...
      Knowing how to code in js does not necessarily mean that everyone has read "The Good Parts" or any of the exhaustive tomes that actually mention the misbehavior of core javascript...
      Clever code is not clever, and that line could mean anything, let alone relying on the moving target that is js...

      I see no bug here.

      .02 worth


      On 2012/08 /31, at 10:07 AM, Martin Cooper wrote:

      > If I want to create, say, a separator line of 'len' dashes, I can do
      > that really cleanly and easily with:
      > var separator = Array(len).join('-');
      > If there's a one-liner that is just as simple, clean, and obvious as
      > that, I'll be happy to use it. But please don't tell me I have to dumb
      > down my code and use a multi-line function to do something that works
      > perfectly well - until I try to get it past JSLint.
      > --
      > Martin Cooper
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >

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