---
title: "JSValueIsInstanceOfConstructor(_:_:_:_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jsvalueisinstanceofconstructor(_:_:_:_:)"
---

# JSValueIsInstanceOfConstructor(_:_:_:_:)

Tests whether a JavaScript value is an object that the specified constructor creates.

## Declaration

```swift
func JSValueIsInstanceOfConstructor(_ ctx: JSContextRef!, _ value: JSValueRef!, _ constructor: JSObjectRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> Bool
```

## Parameters

- `ctx`: The execution context to use.
- `value`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSValueRef to test.
- `constructor`: The constructor to test against.
- `exception`: A pointer to a doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSValueRef to store an exception in, if any. Pass NULL to discard any exception.

## Return Value

Return Value true if the value is an object that constructor creates, according to the JavaScript instanceof operator; otherwise, false.

## See Also

### Comparing Values

- [JSValueIsEqual(_:_:_:_:)](javascriptcore/jsvalueisequal(_:_:_:_:).md)
- [JSValueIsStrictEqual(_:_:_:)](javascriptcore/jsvalueisstrictequal(_:_:_:).md)
