array.slice()

Returns a new array, from the start position up to the count of elements

array.slice( offset=number, length=number )

Returns: Array

Argument Description
offset
number, required

start position in the original array to slice

length
number, optional

maximum elements to slice from offset

Examples

myarray = ["one","two","three","TWO","five","Two"];
	res = myarray.slice(2,4);
	writedump(res);
	myarray = ["one","two","three","TWO","five","Two"];
	res = myarray.slice(3,4);
	writedump(res);

See also