VBS tutorial: Functions – isarray functions


Isarray function

Returns a Boolean value indicating whether a variable is an array.


varnameParameters can be any variable.


If the variable is an array,IsArrayFunction returnTrue; Otherwise, the function returnsFalse。 When a variable contains an array, useIsArrayFunction is very effective.

The following example usesIsArrayFunction to verify whether myvariable is an array:

Dim myvariabledim myArray (3) myArray (0) = "Sunday" myArray (1) = "Monday" myArray (2) = "Tuesday" myvariable = isarray (myArray) 'myvariable contains "true".