Javascript code to append one or multiple values at the end of array
Append one value
<script type="text/javascript"> var arr = ["v1", "v2"]; arr.push("v3"); arr.forEach (function(item, idx) { document.write("idx=" + idx + " item=" + item + "<br/>"); }); </script>
Append multiple values
<script type="text/javascript"> var arr = ["v1", "v2"]; arr.push("v3", "v4"); arr.forEach (function(item, idx) { document.write("idx=" + idx + " item=" + item + "<br/>"); }); </script>