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 is Associative Array? How do we use it?
What does js stand for?
What are the boolean operators supported by javascript? And operator: &&
How do I turn on javascript?
Which is better python or javascript?
What is an external javascript?
What are the problems associated with using javascript, and are there javascript techniques that you discourage?
Is a javascript script faster than an asp script?
Can we learn javascript without knowing java?
Explain the difference between “==” and “===”?
How do you declare in javascript?
What is strict mode?
Write the point of difference between web-garden and a web-farm?
What is difference between java and javascript?
What is js injection?