What's the benefit from this:
nextIdMod.call(subsys1);
nextIdMod.call(subsys2,1000);
to this:
var subsys1 = new nextIdMod();
var subsys2 = new nextIdMod(1000);
?
Am i missing something out?
No benefit, and in the 1st case, subsys1 and subsys2 will not inherit the
prototype chain from nextIdMod, nor will be an instance of it, unless set
explicitly using __proto__ which is non standard.
_______________________________________________
JSMentors mailing list
[email protected]
http://jsmentors.com/mailman/listinfo/jsmentors_jsmentors.com
List Archive:
http://jsmentors.com/pipermail/jsmentors_jsmentors.com/