function and object types

G

gg9h0st

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.
 
G

gg9h0st

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top