Converts value to an integer suitable for use as the length of an array-like object.
value
Note: This method is based on ToLength.
ToLength
The value to convert.
Returns the converted integer.
5.13.0
toLength(3.2)// => 3toLength(Number.MIN_VALUE)// => 0toLength(Infinity)// => 4294967295toLength('3.2')// => 3 Copy
toLength(3.2)// => 3toLength(Number.MIN_VALUE)// => 0toLength(Infinity)// => 4294967295toLength('3.2')// => 3
Converts
value
to an integer suitable for use as the length of an array-like object.Note: This method is based on
ToLength
.