-
-
Notifications
You must be signed in to change notification settings - Fork 808
/
Copy pathrepl.txt
41 lines (30 loc) · 965 Bytes
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{{alias}}( x[, start[, end]] )
Returns a shallow copy of a portion of an array.
If provided an array-like object having a `slice` method, the function
defers execution to that method and assumes that the method has the
following signature:
x.slice( start, end )
If provided an array-like object without a `slice` method, the function
copies input array elements to a new generic array.
Parameters
----------
x: ArrayLikeObject
Input array.
start: integer (optional)
Starting index (inclusive). Default: 0.
end: integer (optional)
Ending index (exclusive). Default: x.length.
Returns
-------
out: Array|TypedArray
Output array.
Examples
--------
> var out = {{alias}}( [ 1, 2, 3, 4 ] )
[ 1, 2, 3, 4 ]
> out = {{alias}}( [ 1, 2, 3, 4 ], 1 )
[ 2, 3, 4 ]
> out = {{alias}}( [ 1, 2, 3, 4 ], 1, 3 )
[ 2, 3 ]
See Also
--------