On Jan 19, 3:22 pm, Balázs Galambosi <[email protected]> wrote:
> 2011/1/19 Jorge <[email protected]>:
>
> > I sometimes just don't declare them with var but as parameters:
>
> > function (x) {
> > var a,b;
> > ...
> > }
>
> > function (x, a, b) { ... }
>
> That is an awful habit, leads to confusion and error prone.
> Apart from that... it's still bad. :)
Yeah, and it gets even worse when a month later when I see the
function again I can't tell apart the real parameters from the vars,
but I've got a solution:
function (x /* vars */, a, b) { ... }
Awesome, isn't it :-)) ?
--
Jorge.
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]