Creating variables in VBScript can be done by using the Dim, Public, or Private statement. It is best practice to put at the top of the script "Option Explicit" which forces you to explicitly define a variable.
You can declare one variable like this:
Option Explicit
Dim firstName
Or you can several variables like this:
Option Explicit
Dim firstName, middleName, lastName
If you do not have the option explicit statement, you can create variables like so:
firstName="Foo"
This is NOT recommended as strange results can occur during the run time phase of your script. This happens if a typo is made later when reusing the variable.
To create an array, simply declare it with how many elements in the parameter:
Option Explicit
Dim nameList(2)
This creates an array with three elements
To set array elements, simply use the variable with the index as parameter like so:
nameList(0) = "John"
VBScript also supports multi-dimensional arrays:
Option Explicit
Dim gridFactors(2, 4)