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
What and where are the best javascript resources on the web?
How host objects are different from native objects in javascript?
What is the main difference between Map collections and other collections such as Set.
How to toggle display an html element?
What does the term sticky session mean in a web-farm scenario?
Should I disable javascript?
How can we establish connection with java and sql server?
What is a reverse string?
What is array explain it?
How to reload a page using JavaScript?
How onclick works in javascript?
What are the difference between javascript and jquery?
What is emotional closure?
How can a particular frame be targeted, from a hyperlink, in javascript?
What are the advantages of using JavaScript?