unique number for each object?

P

petermichaux

Hi,

Is there an internally assigned number for each JavaScript object that
I can read? If so how would I do that?

Thanks,
Peter
 
R

Richard Cornford

Is there an internally assigned number for each JavaScript object
that I can read? ...

No. If you want unique identifiers for JS objects you have to create
them yourself (and it is useful to think about how unique they need to
be before you start).

Richard.
 
P

petermichaux

Richard said:
No. If you want unique identifiers for JS objects you have to create
them yourself (and it is useful to think about how unique they need to
be before you start).


Thanks Richard,

What unexpected considerations need to be made when making a unique id?
I am currently using a prefix and a counter together as a string for
the identifier. The counter increments each time a constructor makes a
new object.

Peter
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top