Here is the code:
var cars=new Array(5);
document.write("<b>On referring the array with index number,
their values have been displayed:</b><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.