Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a way to append a value to an array?

Answer Posted / venkateswaran

We can append a value in a array using two methods
1.push() - add elements in end of the array
2.unshift() - add elements in begining of the array.

For example;
var arr = new Array(3);
arr[0] = "Venkat";
arr[1] = "Sathya";
arr.push("Meena")

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What and where are the best javascript resources on the web?

979


How host objects are different from native objects in javascript?

1010


What is the main difference between Map collections and other collections such as Set.

3041


How to toggle display an html element?

1069


What does the term sticky session mean in a web-farm scenario?

977


Should I disable javascript?

940


How can we establish connection with java and sql server?

2199


What is a reverse string?

1030


What is array explain it?

878


How to reload a page using JavaScript?

1204


How onclick works in javascript?

915


What are the difference between javascript and jquery?

1118


What is emotional closure?

901


How can a particular frame be targeted, from a hyperlink, in javascript?

1049


What are the advantages of using JavaScript?

1018