tenoch
12-02-2003, 08:12 AM
Hello!
Would naming the properties and parameters of a constructor with the same names like this cause problems?:function Myself(age, gender, weight) {
this.age = age;
this.gender = gender;
this.weight = weight;
}I've seen examples where this is done while others seem to use different names. Is one way better than the other? If so, why?
I'm just starting out in the object-bisniss, so don't laugh if this is stupid, ok? :p
Thanx for any replies! :)
Would naming the properties and parameters of a constructor with the same names like this cause problems?:function Myself(age, gender, weight) {
this.age = age;
this.gender = gender;
this.weight = weight;
}I've seen examples where this is done while others seem to use different names. Is one way better than the other? If so, why?
I'm just starting out in the object-bisniss, so don't laugh if this is stupid, ok? :p
Thanx for any replies! :)