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

# atIndex(_:)

Returns the value at the specified numeric index in the JavaScript object value.

## Declaration

```swift
func atIndex(_ 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 Calling this method is equivalent to using the subscript operator with a numeric subscript in JavaScript. Use it to access elements of JavaScript arrays or of objects with numerically-indexed properties.

## Topics

### Related Documentation

- [objectAtIndexedSubscript(_:)](javascriptcore/jsvalue/objectatindexedsubscript(_:).md)

## See Also

### Working with Container Values

- [defineProperty(_:descriptor:)](javascriptcore/jsvalue/defineproperty(_:descriptor:).md)
- [hasProperty(_:)](javascriptcore/jsvalue/hasproperty(_:).md)
- [deleteProperty(_:)](javascriptcore/jsvalue/deleteproperty(_:).md)
- [setValue(_:at:)](javascriptcore/jsvalue/setvalue(_:at:).md)
- [forProperty(_:)](javascriptcore/jsvalue/forproperty(_:).md)
- [setValue(_:forProperty:)](javascriptcore/jsvalue/setvalue(_:forproperty:).md)
- [JSValueProperty](javascriptcore/jsvalueproperty.md)
