FANDOM


function array_unshift(arr) {
	for (var i = arguments.length - 1; i > 0; i--) {
		arr.unshift(arguments[i]);
	}
	return arr.length
}

Example Javascript UsageEdit

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.