FANDOM


Programmer's Wiki
This page has been moved to the Programmer's Wiki.
Please do not make any changes or additions to this page.

Any modifications, if still appropriate, should be made on Array push at the Programmer's Wiki.

function array_push(arr) {
	for (var i = 1; i < arguments.length; i++) {
		arr.push(arguments[i]);
	}
	return arr.length
}

Example Javascript UsageEdit

arr1 = new Array("dog", "cat", "mouse");
total = array_push(arr1, "gopher", "shrew");
alert(total); /* Returns: 5 */
alert(arr1); /* Returns: dog,cat,mouse,gopher,shrew */