---
title: "init(JSGlobalContextRef:)"
framework: javascriptcore
role: symbol
role_heading: Initializer
path: "javascriptcore/jscontext/init(jsglobalcontextref:)-9m51"
---

# init(JSGlobalContextRef:)

Creates a JavaScript context object from the equivalent C representation.

## Declaration

```swift
init!(JSGlobalContextRef jsGlobalContextRef: JSGlobalContextRef!)
```

## Parameters

- `jsGlobalContextRef`: A C JavaScript context reference.

## Return Value

Return Value A JavaScript context object representing the same context.

## Discussion

Discussion See JSContextRef for the C JavaScriptCore API.

## See Also

### Working with the C JavaScriptCore API

- [jsGlobalContextRef](javascriptcore/jscontext/jsglobalcontextref.md)
