Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Array.add Function

Adds an element to the end of an Array object. This function is static and is invoked without creating an instance of the object.

Syntax

Array.add(array, item);

Arguments

array

The array to add the item to.

item

The object to add to the array.

Remarks

Use the add function to add an object of any type to the end of an array.

Example

The following example shows how to add an element to the end of an array by using the add function.

JavaScript

var a = ['a', 'b', 'c', 'd'];
Array.add(a, 'e');
// View the results: "abcde"
alert(a.toString());