Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
JavaScript Objects
-Array Object
length
concat
join
pop
push
reverse
shift
slice
splice
sort
toString
unshift
-Date Object
-Error Object
-Math Object
-Number Object
-Object Object
-RegExp Object
-String Object
General Scripting Objects
Data Access Objects
File Access Objects
Http Client Objects
Security and Membership Objects
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

Array Object
You can use the Array object to create arrays in script. An array is an indexed data structure for storing information of related type in script.

Constructor

[new] Array() Creates and returns a new Array object of length 0.
[new] Array(size) Creates and returns a new Array object of length size.
[new] Array(element0, element1,…,elementn) Creates and returns an Array object of length n. The elements of the array are specified by the supplied arguments element0, element1,...,elementn. String arguments must be quoted.

Instance Properties

length The number of elements in the array.

Instance Methods

concat Forms a new array by adding elements to the calling array.
join Concatenates the elements of an array to form a single string.
pop Removes and returns the last element in the calling array.
push Adds elements to the end of the calling array.
reverse Reverses the order of elements in the calling array.
shift Removes and returns the first element of the calling array.
slice Returns a portion of the calling array.
splice Removes and/or replaces elements in the calling array.
sort Sorts the elements of the calling array.
toString Converts the elements of an array to a single string.
unshift Inserts elements to the beginning of the calling array

Example

The following examples demonstrate three uses of the Array object constructor.
    //Creates a new array, Arr1.
    //Arr1 is an empty array.
    var Arr1 = new Array();

    //Creates a new array, Arr2.
    //Arr2 is an empty array,
    //but it has memory to hold five elements.
    var Arr2 = new Array(5);

    //Creates a new array, Arr3.
    //Arr3 contains three string elements.
    var arr3 = new Array("Mercury", "Venus", "Earth");

    
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us