---
title: "JSContextGetGroup(_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jscontextgetgroup(_:)"
---

# JSContextGetGroup(_:)

Gets the context group that a JavaScript execution context belongs to.

## Declaration

```swift
func JSContextGetGroup(_ ctx: JSContextRef!) -> JSContextGroupRef!
```

## Parameters

- `ctx`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSContextRef with the group you want to get.

## Return Value

Return Value The group that ctx belongs to.
