array-last
array-last copied to clipboard
why don`t judge the length of the second parameters
When the length of the second parameters is greater than the length of the array,The undefined will be included in the result.
example:
var last = require('array-last');
var a = last(['a', 'b', 'c', 'd', 'e', 'f'],7);
result
[ undefined, 'a', 'b', 'c', 'd', 'e', 'f' ]
suggest that the length of the first parameters as a loop condition or when the length of the second parameters is greater than the length of the array will return the array self
want to do a pr?
I'm afraid I can't do it well