in Operator
Tests for the existence of a property in an object.
result = property in object
Arguments
- result
- Required. Any variable.
- property
- Required. An expression that evaluates to a string expression.
- object
- Required. Any object.
Remarks
The in operator checks if an object has a property named property. It also checks the object's prototype to see if the property is part of the prototype chain.
Requirements
See Also
Operator Precedence | Operator Summary