469,644 Members | 1,746 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

function and object types

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.

Jan 25 '07 #1
1 1081


On 1월25일, 오후12시32분, "gg9h0st" <mn9h...@hotmail.comwrote:
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.

Jan 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

51 posts views Thread by Richard Hengeveld | last post: by
41 posts views Thread by Alexei A. Frounze | last post: by
3 posts views Thread by yysiow | last post: by
14 posts views Thread by Mike Labosh | last post: by
5 posts views Thread by Ian Bicking | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.