---
title: "init(value:)"
framework: javascriptcore
role: symbol
role_heading: Initializer
path: "javascriptcore/jsmanagedvalue/init(value:)"
---

# init(value:)

Initializes a managed value with the specified JavaScript value.

## Declaration

```swift
init!(value: JSValue!)
```

## Parameters

- `value`: A JavaScript value.

## Return Value

Return Value A new managed value.

## Discussion

Discussion To ensure that the underlying JavaScript value is retained as long as the managed value remains in use in the Objective-C or Swift runtime, report the managed value’s owner to the JavaScriptCore virtual machine using the addManagedReference(_:withOwner:) method.

## See Also

### Creating a Managed Value

- [init(value:andOwner:)](javascriptcore/jsmanagedvalue/init(value:andowner:).md)
