JavaScript Array Object

## JavaScript Reference

Overview

## JavaScript Objects

JS Array JS Boolean JS Date JS Math JS Number JS String JS RegExp JS Global

## Browser Objects

Window Navigator Screen History Location

## HTML DOM Objects

DOM Document DOM Elements DOM Attributes DOM Events

## HTML Objects

DOM Anchor DOM Area DOM Base DOM Body DOM Button DOM Form DOM Frame/IFrame DOM Frameset DOM Image DOM Input Button DOM Input Checkbox DOM Input File DOM Input Hidden DOM Input Password DOM Input Radio DOM Input Reset DOM Input Submit DOM Input Text DOM Link DOM Meta DOM Object DOM Option DOM Select DOM Style DOM Table DOM td / th DOM tr DOM Textarea

# JavaScript Array Object

« Previous
Next Reference »

## Array Object

The Array object is used to store multiple values in a single variable.

For a tutorial about Arrays, read our JavaScript Array Object tutorial.

## Array Object Properties

Property | Description
--- | ---
constructor | Returns the function that created the Array object's prototype
length | Sets or returns the number of elements in an array
prototype | Allows you to add properties and methods to an Array object

## Array Object Methods

Method | Description
--- | ---
concat() | Joins two or more arrays, and returns a copy of the joined arrays
indexOf() | Search the array for an element and returns its position
join() | Joins all elements of an array into a string
lastIndexOf() | Search the array for an element, starting at the end, and returns its position
pop() | Removes the last element of an array, and returns that element
push() | Adds new elements to the end of an array, and returns the new length
reverse() | Reverses the order of the elements in an array
shift() | Removes the first element of an array, and returns that element
slice() | Selects a part of an array, and returns the new array
sort() | Sorts the elements of an array
splice() | Adds/Removes elements from an array
toString() | Converts an array to a string, and returns the result
unshift() | Adds new elements to the beginning of an array, and returns the new length
valueOf() | Returns the primitive value of an array

« Previous
Next Reference »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE