but when the line
createUniqueId.counter = 1;
is executed still the function createUniqueId is not created, so at
that point where does the   createUniqueId.counter is registered,

whether it is the part of Global window object ?,

after line
function createUniqueId(){}
is executed, than wether  property "counter" is a part of Function
createUniqueId ?


On Aug 23, 10:50 am, Hsu Ping Feng <[email protected]> wrote:
> counter is a property of createUniqueId, not var f. Only the properties
> attached to createUniqueId.prototype can be found through var f. This is the
> way how prototype chain works.
>
> Fillano
>
> 2011/8/23 Rahul <[email protected]>
>
>
>
>
>
> > createUniqueId.counter = 1;
> > createUniqueId.prototype.cntr = 99;
>
> > function createUniqueId(){
> >        this.cccc = 1000;
> >        alert(" createUniqueId.cntr "+createUniqueId.cntr);
> >        return createUniqueId.counter++;
> > }
>
> > function fn05(){
> >        var f = new createUniqueId();
> >        alert(" f.counter "+f.counter);
> >        alert(" f.cccc "+f.cccc);
> >        alert(" f.cntr "+f.cntr);
> > }
>
> > what does my first line of code is,
> > whether "counter" is a part of function "createUniqueId" ?
>
> > if yes, than why f.counter gives me undifined ?
>
> > --
> > 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]
>
> --
> AUFKLÄRUNG ist der Ausgang des Menschen aus seiner selbstverschuldeten
> Unmündigkeit. Unmündigkeit ist das Unvermögen, sich seines Verstandes ohne
> Leitung eines anderen zu bedienen. Selbstverschuldet ist diese Unmündigkeit,
> wenn die Ursache derselben nicht am Mangel des Verstandes, sondern der
> Entschließung und des Mutes liegt, sich seiner ohne Leitung eines andern zu
> bedienen. Sapere aude! Habe Mut, dich deines eigenen Verstandes zu bedienen!
> ist also der Wahlspruch der Aufklärung.- Hide quoted text -
>
> - Show quoted text -

-- 
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]

Reply via email to