[Chapter 21] Reference: JSObject.getSlot()
Author: David Flanagan
Date: Fri Aug 29 11:17:05 1997

#

| Chapter 21 JavaScript Reference |

# JSObject.getSlot() Java Method

## Name

JSObject.getSlot() Java Method---read an array element of a JavaScript object

## Availability

Part of the netscape.javascript package included with Navigator 3.0

## Synopsis

    public Object getSlot(int index)

### Arguments

`index`

  The index of the array element to be read.

### Returns

The value of the array element at the specified `index` of a JavaScript object.

## Description

The `getSlot()` method of the Java JSObject class reads and returns to Java the value of an array element at the specified `index` of a JavaScript object. The return value may be another JSObject object, or a Double, Boolean, or String object, but is returned as a generic Object, which you must cast as necessary.

## See Also

"JSObject", Chapter 19, LiveConnect: JavaScript and Java

JSObject.getMember() |  | JSObject.getWindow()