Samer Ziadeh wrote: > > > On Fri, Aug 14, 2009 at 00:00, Daniel Friesen > <nadir.seen.f...@gmail.com <mailto:nadir.seen.f...@gmail.com>> wrote: > > > function Person() { > return Object.create(Person.prototype, { > first: { value: '' } > last: { value: '' } > }); > } > > > oh ok, so then all i have to do is this? or do I have it wrong? > > var boy = Person(); > var girl = Person(); Yup, though to be technical both `new Person();` and `Person()` are valid, since the return overrides the object created with new. > > > You could even chose to make those non-enumerable or lock them > with values. > > > Yeah I was reading over the specifications, but I haven't really > thought about it fully as to how implement it. Not possible. The ability to change enumerability/writability/configurability from JS is an ES5 addition. > -- > Samer Ziadeh > www.samerziadeh.com <http://www.samerziadeh.com> > > > "Let It Be"
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---