Returns a length-fixed array from the given array
Optional
The arrays to inspect
The length to fix
The fill value if the array is shorter than the length
a length-fixed array from the given array
David Hsing
fixLength(undefined, -1); // []fixLength(['foo', 'bar'], 1); // ['foo']fixLength(['foo', 'bar'], 2); // ['foo', 'bar']fixLength(['foo', 'bar'], 3); // ['foo', 'bar', undefined] Copy
fixLength(undefined, -1); // []fixLength(['foo', 'bar'], 1); // ['foo']fixLength(['foo', 'bar'], 2); // ['foo', 'bar']fixLength(['foo', 'bar'], 3); // ['foo', 'bar', undefined]
Returns a length-fixed array from the given array