Here is the code:
<h2><u>Add Element to Array</u></h2>
var array = new Array();
array = "Java";
array = "ASP.NET";
array = "PERL";
array = "C/C++";
document.write("<b>The Array is:</b> <br>");
document.write(array[i] + "<br >");
Output will be displayed as:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.