app-array

On this page:

slice

Summary

Slices the array and returns the sliced portion.

Description

Returns a shallow copy of a portion of an array into a new array object selected from begin to end(end not included). The original array will not be modified.

Route

POST /array/slice

Roles

admin

Parameters

DetailsExampleSchema
Name Type Required Description
arr array yes The array to slice
begin number yes Zero-based index at which to begin extraction
end number yes Zero-based index before which to end extraction. slice extracts up to but not including end

Return

DetailsExampleSchema
Name Type Description
slicedArray array A new array containing the extracted elements