What is a way to append a value to an array?
Answers were Sorted based on User's Feedback
Answer / narasimhan
We can use push() method to add an element in an array in
its last node.
| Is This Answer Correct ? | 25 Yes | 3 No |
Answer / 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 |
Answer / gayathri
its a way to append a value to an array
arr[arr.length] = value;
| Is This Answer Correct ? | 4 Yes | 7 No |
Answer / shailendra shukla
String AnswerArray[];
AnswerArray=new String[50];
Int Index=1;
AnswerArray[Index]=Test;
| Is This Answer Correct ? | 5 Yes | 11 No |
Why does the browser display the slow script warning?
What is array explain it?
How to validate email in javascript?
What is a callback url?
What do you mean by ide?
What is question mark in javascript?
how to create a moving div?
Can I open javascript on iphone?
accessdenied javanet disconnet
What are the data types in js?
What is the importance of javascript?
How is javascript different from java?