Contents

atIndex(_:)

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

Declaration

func atIndex(_ index: Int) -> JSValue!

Parameters

  • index:

    An index in the JavaScript object.

Return Value

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

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

See Also

Working with Container Values