JavaScript in Operator
The in operator in JavaScript is a built-in operator used to determine if a specific property exists within an object. It evaluates to true if the property is found, and false otherwise.
Parameters: The in operator takes the following parameters:
- prop: A string or symbol representing the property name or array index.
- object: The object to be checked for the presence of the prop.
Return value: The in operator returns a boolean value:
- true: If the specified property is found in the object.
- false: If the specified property is not found in the object.
For a comprehensive list of JavaScript operators, please refer to the article "JavaScript Operators Complete Reference".
Supported Browsers: The in operator is supported by the following web browsers:
- Google Chrome
- Firefox
- Opera
- Safari
- Edge
- Internet Explorer