10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Output<br />

arr.constructor is:function Array() { [native code] }<br />

length<br />

Javascript array length property returns an unsigned, 32-bit integer that<br />

specifies the number of elements in an array.<br />

Syntax<br />

Its syntax is as follows:<br />

array.length<br />

Return Value<br />

Returns the length of an array.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript Array length Property<br />

<br />

<br />

<br />

var arr = new Array( 10, 20, 30 );<br />

document.write("arr.length is:" + arr.length);<br />

<br />

<br />

<br />

Output<br />

arr.length is:3<br />

179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!