calculate-from-index-right-x
Calculates a fromIndexRight of a given value for an array.
module.exports(array, fromIndex)
⇒ number
⏏
This method calculates a fromIndexRight of a given value for an array.
Kind: Exported function
Returns: number
- The calculated fromIndex. Default is 0.
Throws:
TypeError
If array is null or undefined.
Param | Type | Description |
---|---|---|
array | Array |
The array on which to calculate the starting index. |
fromIndex | number |
The position in this array at which to begin. A negative value gives the index of array.length + fromIndex by asc. |
Example
; ; // 1; // 2; // -Infinity; // 2