function and object types

Discussion in 'Javascript' started by gg9h0st, Jan 25, 2007.

  1. gg9h0st

    gg9h0st Guest

    function aa() {};
    var bb = new aa();

    var dd = new function cc() {};

    aa.prototype.rr = 100;
    cc.prototype.rr = 100;

    ---------------------------------------------------------------

    i wrote the code above that makes two functions and two object for
    those.

    bb(object)<-aa(function),
    cc(object)<-dd(function).

    i think it's all the same way to make an object for a function.

    but if u try to debug,

    bb object has rr right after "aa.prototype.rr = 100" statement
    but cc deosn't have rr variable.

    can anyone explain it why?

    thanks in advance.
     
    gg9h0st, Jan 25, 2007
    #1
    1. Advertising

  2. gg9h0st

    gg9h0st Guest

    On 1¿ù25ÀÏ, ¿ÀÈÄ12½Ã32ºÐ, "gg9h0st" <> wrote:
    > function aa() {};
    > var bb = new aa();
    >
    > var dd = new function cc() {};
    >
    > aa.prototype.rr = 100;
    > cc.prototype.rr = 100;
    >
    > ---------------------------------------------------------------
    >
    > i wrote the code above that makes two functions and two object for
    > those.
    >
    > bb(object)<-aa(function),
    > dd(object)<-cc(function).
    >
    > i think it's all the same way to make an object for a function.
    >
    > but if u try to debug,
    >
    > bb object has rr right after "aa.prototype.rr = 100" statement
    > but dd deosn't have rr variable.
    >
    > can anyone explain it why?
    >
    > thanks in advance.


    sorry. some misstakes in prev message.
    -> dd(object)<-cc(function).
    ->but dd deosn't have rr variable.
    modified.
     
    gg9h0st, Jan 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sathyaish
    Replies:
    2
    Views:
    612
    Sathyaish
    May 22, 2005
  2. Paul

    object and object types

    Paul, Jan 7, 2011, in forum: C++
    Replies:
    20
    Views:
    671
    Juha Nieminen
    Jan 8, 2011
  3. MikeL
    Replies:
    2
    Views:
    299
    Dino Chiesa [Microsoft]
    Feb 22, 2005
  4. ittium
    Replies:
    4
    Views:
    328
    Goran
    Dec 9, 2011
  5. Sam Kong
    Replies:
    12
    Views:
    303
    John G Harris
    Oct 17, 2006
Loading...

Share This Page