> -----Original Message-----
> From: Ian Skinner [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 14, 2005 4:27 PM
> To: CF-Talk
> Subject: RE: OT JavaScript compare two objects
> 
> Nope actually the former, two references to the same object.  I wanted to
> pass in a reference to an object (in this case a singe li) and then loop
> over a collection of objects (in this case all the li's in an ul) and do
> something when the first reference matched the one of the second
> references.

In JavaScript 1.3 and over you can use the identity operator ("===" - three
equals signs).  This returns a "strict" equals.  Two references to the same,
exact object would return true, but two references to object which contain
the same data would not.

Subtle, but very useful in certain situations.

Jim Davis





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202918
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to