---
title: "objectAtIndexedSubscript(_:)"
framework: javascriptcore
role: symbol
role_heading: Instance Method
path: "javascriptcore/jsvalue/objectatindexedsubscript(_:)"
---

# objectAtIndexedSubscript(_:)

Returns the value’s JavaScript property at the specified index, allowing subscript syntax.

## Declaration

```swift
func objectAtIndexedSubscript(_ index: Int) -> JSValue!
```

## Parameters

- `index`: An index in the JavaScript object.

## Return Value

Return Value The value at the specified index, or the JavaScript undefined value if no property exists at that index.

## Discussion

Discussion This method is equivalent to the atIndex(_:) method, but provides Objective-C subscripting support.

## See Also

### Accessing Values with Subscript Syntax

- [setObject(_:atIndexedSubscript:)](javascriptcore/jsvalue/setobject(_:atindexedsubscript:).md)
- [objectForKeyedSubscript(_:)](javascriptcore/jsvalue/objectforkeyedsubscript(_:).md)
- [setObject(_:forKeyedSubscript:)](javascriptcore/jsvalue/setobject(_:forkeyedsubscript:).md)
