VBArray.toArray()

JScript3.0+Syntax

							vbarray.toArray()

Description

The toArray() method of an instance of a VBArray returns a valid JScript array from a VBArray.

Example

Listing 9.141 calls a VBScript function from a JavaScript new operator to create a Visual Basic safe array. The array itself writes the contents of this two-dimensional array to the user's page. The array is then converted into a valid JScript array and an alert box is invoked to display a value in this array.

Listing 9.141 Using the toArray() Method
 <script LANGUAGE="VBScript"> <!-- Hide ' Define the VB Array Function myVBArray() ' Define variables for 2-D array positioning Dim i Dim j ' Define variable to hold incremented values to put into ' array and assign it an initial ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.