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 "strict mode" and how is it used in JavaScript?

1214


How can we establish connection with java and sql server?

2273


What is a method in javascript?

1046


What is the best ide for javascript development?

953


What is a function callback?

1032


Can you explain the difference between call and apply?

1035


How can you set position of the page (top and left) to 0 using javascript in one line code?

1054


How do you write an if statement in javascript?

977


How do I enable cookies safari?

940


what is the difference between window & document in javascript?

1004


What are all the looping structures in javascript?

1139


How to test 404 page in QA

2558


How do you declare javascript?

1011


How to select an element by id and swapping an image?

936


How many types of data types are there?

1025