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 |
What is the result of below given line of code in java script? 5+4+'7'?
What is the use of a weakmap object in javascript?
Do you need to declare variables in javascript?
Is javascript server side or client side?
How to write hello world on the web page?
What is Javascript namespacing? How and where is it used?
How to test for bad numbers using javascript?
How do I use javascript to password-protect my web site?
What is the purpose of local variables?
How Does Function Hoisting Work in JavaScript?
Iam getting xml when we click on one button.Iam placing that xml in dom.Im getting that xml data in one xsl.In that xsl I want to increase the variable value which is declared in xsl. Ex: <parent_node> <childNode> <first><d1>ffftt</d1></first> <first><d1>eeeeiii</d1></first> <first><d1>uuuuwww</d1></first> </childNode> <childNode> <first><d1>fff</d1></first> <first><d1>eeee</d1></first> <first><d1>uuuu</d1></first> </childNode> </parent_node>
Write a Program of Simple Calculator in JavaScript using HTML.