Connecting Tech Pros Worldwide Help | Site Map

function and object types

gg9h0st
Guest
 
Posts: n/a
#1: Jan 25 '07
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
Guest
 
Posts: n/a
#2: Jan 25 '07

re: function and object types




On 1¿ù25ÀÏ, ¿ÀÈÄ12½Ã32ºÐ, "gg9h0st" <mn9h...@hotmail.comwrote:
Quote:
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.

Closed Thread