-
-
Notifications
You must be signed in to change notification settings - Fork 809
/
Copy pathrepl.txt
39 lines (28 loc) · 958 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
{{alias}}( x, searchElement, fromIndex )
Returns the index of the first element which equals a provided search
element according to the same value algorithm.
The function performs a linear scan and returns immediately upon finding a
match.
If unable to find an element which equals a provided search element, the
function returns -1.
The function treats `-0` and `+0` as distinct and `NaNs` as the same.
Parameters
----------
x: ArrayLikeObject
Input array.
searchElement: any
Search element.
fromIndex: integer
Starting index (inclusive). If less than zero, the starting index is
resolved relative to the last array element, with the last array element
corresponding to `fromIndex = -1`.
Returns
-------
out: integer
Index or -1.
Examples
--------
> var out = {{alias}}( [ 1, 2, 3, 4 ], 3, 0 )
2
See Also
--------