|Property/method value type:||String primitive|
|Argument list:||anEndPosition||A location within the string to end the sub-string extraction. If this is omitted then the end of the string is assumed to be the end position.|
|aStartPosition||A location within the string to begin the sub-string extraction.|
If only one argument is provided, this method returns a sub-string starting at the indicated character position and proceeding to the end of the string. Where two arguments are provided the start and end points of the string are used to slice out a portion and return just that part.
When just one argument is provided, the second is supplied internally and is taken to be end of the string.
Where an argument is actually NaN rather than a meaningful value, then Zero is used instead.
If any argument is greater than the length of the string, then the length of the string is used instead.
Where the start point is larger than the end point, the two values are swapped over.
This method is intentionally generic and can be applied to non-string objects. Where necessary, the receiving object may be converted to a string so that a sub-string can be extracted.
The result returned by this method is the sequence of characters between the start and end positions of the source string. The value returned is a string primitive.
ECMA 262 edition 2 - section - 188.8.131.52
ECMA 262 edition 2 - section - 184.108.40.206
ECMA 262 edition 3 - section - 220.127.116.11