function slice( x, start, end ) {
	var obj;
	if ( hasMethod( x, 'slice' ) ) {
		return x.slice( start, end );
	}
	obj = arraylike2object( x );
	if ( obj.accessorProtocol ) {
		return accessors( obj, start, end );
	}
	// Assume we can use the built-in `Array#slice` method to copy elements to a generic array:
	return builtin( x, start, end );
}
Returns a shallow copy of a portion of an array.

@param {Collection} x - input array
@param {integer} start - starting index (inclusive)
@param {integer} end - ending index (exclusive)
@returns {Collection} output array

@example
var x = [ 1, 2, 3, 4 ];

var out = slice( x, 1, 3 );
// returns [ 2, 3 ]

var bool = ( out === x );
// returns false

@example
var Int32Array = require( '@stdlib/array/int32' );

var x = new Int32Array( [ 1, 2, 3, 4 ] );

var out = slice( x, 1, 3 );
// returns <Int32Array>[ 2, 3 ]

var bool = ( out === x );
// returns false