---
title: "JSValueGetType(_:_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jsvaluegettype(_:_:)"
---

# JSValueGetType(_:_:)

Returns a JavaScript value’s type.

## Declaration

```swift
func JSValueGetType(_ ctx: JSContextRef!, _ value: JSValueRef!) -> JSType
```

## Parameters

- `ctx`: The execution context to use.
- `value`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSValueRef with the type you want to obtain.

## Return Value

Return Value A JSType value that identifies the value’s type.

## See Also

### Testing the Value’s Type

- [JSValueIsUndefined(_:_:)](javascriptcore/jsvalueisundefined(_:_:).md)
- [JSValueIsNull(_:_:)](javascriptcore/jsvalueisnull(_:_:).md)
- [JSValueIsBoolean(_:_:)](javascriptcore/jsvalueisboolean(_:_:).md)
- [JSValueIsNumber(_:_:)](javascriptcore/jsvalueisnumber(_:_:).md)
- [JSValueIsString(_:_:)](javascriptcore/jsvalueisstring(_:_:).md)
- [JSValueIsSymbol(_:_:)](javascriptcore/jsvalueissymbol(_:_:).md)
- [JSValueIsObject(_:_:)](javascriptcore/jsvalueisobject(_:_:).md)
- [JSValueIsObjectOfClass(_:_:_:)](javascriptcore/jsvalueisobjectofclass(_:_:_:).md)
- [JSValueIsArray(_:_:)](javascriptcore/jsvalueisarray(_:_:).md)
- [JSValueIsDate(_:_:)](javascriptcore/jsvalueisdate(_:_:).md)
- [JSValueGetTypedArrayType(_:_:_:)](javascriptcore/jsvaluegettypedarraytype(_:_:_:).md)
- [JSType](javascriptcore/jstype.md)
