<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:@EA@JSType"
  },
  "title" : "JSType"
}
-->

# JSType

Constants that identify the type of a JavaScript value.

```
struct JSType
```

## Topics

### Constants

[`kJSTypeUndefined`](/documentation/JavaScriptCore/kJSTypeUndefined)

The unique undefined value.

[`kJSTypeNull`](/documentation/JavaScriptCore/kJSTypeNull)

The unique null value.

[`kJSTypeBoolean`](/documentation/JavaScriptCore/kJSTypeBoolean)

A primitive Boolean value.

[`kJSTypeNumber`](/documentation/JavaScriptCore/kJSTypeNumber)

A primitive number value.

[`kJSTypeString`](/documentation/JavaScriptCore/kJSTypeString)

A primitive string value.

[`kJSTypeObject`](/documentation/JavaScriptCore/kJSTypeObject)

An object value.

[`kJSTypeSymbol`](/documentation/JavaScriptCore/kJSTypeSymbol)

A primitive symbol value.

### Initializers

[`init(_:)`](/documentation/JavaScriptCore/JSType/init(_:))

Creates a JavaScript type.

[`init(rawValue:)`](/documentation/JavaScriptCore/JSType/init(rawValue:))

Creates a JavaScript type with the specified raw value.

[`rawValue`](/documentation/JavaScriptCore/JSType/rawValue)

The raw value that represents the JavaScript type.

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)