|
|
Though long a user of user functions, today I ran face first into a
parameter naming trap which had me tangled up for hours. Though perhaps
not too surprising in hindsight, thought I'd pass along the lesson learned.
Fn0 = function (x,y,z) {...} // OK. Pass anything you want for x,y,z.
Fn1 = function (v) {...} // OK. Pass anything you want for v.
Fn2 = function (x,y,z,v) // Boom! What you pass for v overwrites y.
Looks to be related to u and v being synonyms for x and y. Something like:
Fn3 = function (x,y,z,_v) {...} // OK. Pass what you want.
Bill P.
Post a reply to this message
|
|