Dynamic Array is one where elements can be added dynamically.Below are some ways to add dynamic javascript array elements.
<html>
<head>
<script type="text/javascript">
var family=new Array();
function add() {
var str=prompt("Add your family member");
if(str!=='undefined' && str!=null && str!='')
family.push(str);
return family;
}
</script>
</head>
<body>
<form>
<h1>Dynamic Javascript Array Examples</h1>
<input type="button" name="add_me" value="Add Member" onclick="return add();" class="input_button" />
<input type="button" name="show_value" value="Show Members" onclick="return alert(family);" class="input_button" />
</form>
</body>
</html>
From this examples you will definitely understand what is dynamic javascript array.
Click here to understood dynamic javscript with example.Please use console window to run the script.
There will be many ways exist to add dynamic array elements.But i showed 2 examples of what is dynamic array or objects.