---
title: "init(range:in:)"
framework: javascriptcore
role: symbol
role_heading: Initializer
path: "javascriptcore/jsvalue/init(range:in:)"
---

# init(range:in:)

## Declaration

```swift
init!(range: NSRange, in context: JSContext!)
```

## Return Value

Return Value A newly allocated JavaScript object containing properties named location and length, with values from the NSRange.

## Discussion

Discussion Create a JSValue from a NSRange.
