<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSValue/isInstance(of:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:objc(cs)JSValue(im)isInstanceOf:"
  },
  "title" : "isInstance(of:)"
}
-->

# isInstance(of:)

Returns a Boolean value indicating whether the value is an instance of another JavaScript object value.

```
func isInstance(of value: Any!) -> Bool
```

## Parameters

`value`

The value to be compared against.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if this value inherits from `value`; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

This method is analogous to the `instanceof` operator in JavaScript: it tests for the presence of the specified value’s constructor prototype in this value’s prototype chain.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)