Home > Java Script, open source products > Javascript Array() object Reference.

Javascript Array() object Reference.

Javascript Array() object Reference :

Some of the useful Javascript  array tips & Functiona are,

var numeric= new Array();

numeric[0]=0;

numeric[1]=1;

numeric[2]=2;

numeric[3]=3;

numeric[4]=4;

document.write(numeric);

output : 0,1,2,3,4

var alpha=Array(a,b,c,d,e);        //  var alpha=[a,b,c,d,e];

Some of the functions are,

numeric.concat(alpha);

numeric.join(“+”);

numeric.pop();

numeric.length;

numeric.push();

numeric.reverse();

numeric.shift();

numeric.slice();

numeris.sort();  –> It does not sort numeric..it sorts only alphabetic.

numeric.splice(4,2,”Vijayan”,”Anand”);

numeric.unshift(100,200);

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: