Connecting Tech Pros Worldwide Help | Site Map

function and object types

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 25th, 2007, 02:45 AM
gg9h0st
Guest
 
Posts: n/a
Default 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.


  #2  
Old January 25th, 2007, 05:35 AM
gg9h0st
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.