2985Re: [jslint] Array construction bug
- Aug 31, 2012You 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...
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.
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]
- << Previous post in topic Next post in topic >>