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 is Associative Array? How do we use it?

1034


What does js stand for?

919


What are the boolean operators supported by javascript? And operator: &&

997


How do I turn on javascript?

872


Which is better python or javascript?

950


What is an external javascript?

958


What are the problems associated with using javascript, and are there javascript techniques that you discourage?

1240


Is a javascript script faster than an asp script?

975


Can we learn javascript without knowing java?

1024


Explain the difference between “==” and “===”?

1068


How do you declare in javascript?

883


What is strict mode?

1185


Write the point of difference between web-garden and a web-farm?

945


What is difference between java and javascript?

1015


What is js injection?

918