The object is examined to see if the property exists. If it does, then a Boolean true value is returned, otherwise the expression returns false.
This might be useful as a work-around for when you need to test for the existence of a property but to do so by referring to it directly might cause a run-time error.
The logical operator yields true if the property exists in the object and false if the property is not available.
Prev | Home | Next |
import | Up | in ... |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |