Array Function

Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE

ASP are extremely useful for working with groups of strings, numbers or other items. Here are functions to help you work with your asp coding. Interested in using arrays to help you organize your variables? Here are the basics. Instead of filling in your array values one by one, the array function lets you fill them in a whole block at a time. In short arrays are variables that can store more than one value. They are used to store a series of related information. Lets create an array called 'myArray' that will hold the names of 7 soccer teams. Arrays in ASP/VBScript have a zero based index. This means that the first item in the array starts at 0. The Array function returns a variant containing an array. The first element in the array is zero. Arrays can help you 'group' sets of information together, like the names of states, or names of countries, or colors, or any other grouping. What is an array? An array is a variable that has multiple 'buckets' associated with it. Instead of creating variables called Book1, Book2, Book3, Book4, Book5, and so on, you simply make one array. Its parameter is arglist which requires a list of values that is the elements in the array.

The Syntax of the Array function is :-

Array(arglist)


Example#1 :-

Code :-
dim aa=Array(5,10,15,20)document.
write(a(3))
Output :-
20


Example#2 :-

Code :-
dim aa=Array(5,10,15,20)document.
write(a(0))
Output :-

5


 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641