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

Why is javascript so important?

915


Are Typescript and Javascript the same?

958


How to load another html page from javascript?

918


Which built-in method combines the text of two strings and returns a new string?

1076


What is an onclick?

876


What is the difference between local storage & session storage?

867


Define escape() function?

880


What is s+ in regex?

918


What are the main features of javascript?

1042


Do I need javascript enabled?

938


How to have the status line update when the mouse goes over a link (the support of the status line is sporadic)?

915


What is undefined in math?

829


How to disable an html object ?

1046


Which built-in method adds one or more elements to the end of an array and returns the new length of the array?

1290


What does double mean in javascript?

1030