JavaScript.HasProperty
----------------------

Checks if a property is defined.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JavaScriptWebKit](component_JavaScriptWebKit.md) | [5.4](newinversion54.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JavaScript.HasProperty"; JavaScriptContext; PropertyName ) 

**MBS**( **"JavaScript.HasProperty";** /\* Checks if a property is defined. \*/  
**$JavaScriptContext**; /\* The reference number of the javascript context.e.g. $Context \*/   
**$PropertyName**) /\* The name of the property.e.g. "FirstName" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| JavaScriptContext | The reference number of the javascript context. | $Context |
| PropertyName | The name of the property. | "FirstName" |

### Result

Returns 0, 1 or error.

### Description

Checks if a property is defined.  
### See also

- [JavaScript.GetProperty](JavaScriptGetProperty.md)
- [JavaScript.SetProperty](JavaScriptSetProperty.md)

### Example Databases

- [JavaScript WebKit/JavaScript](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/JavaScript%20WebKit/JavaScript.shtml#3ScriptAnchor_)

This function checks for a license.

Created 5th November 2015 , last changed 9th February 2023

  
[JavaScript.GetPropertyJSON](JavaScriptGetPropertyJSON.md) - [JavaScript.List](JavaScriptList.md)

[HTML Version](JavaScriptHasProperty.shtml)