array-last icon indicating copy to clipboard operation
array-last copied to clipboard

what if second_params is greater than first_params.lenth?

Open Gyuyang opened this issue 2 years ago • 0 comments

you took independent action for scene -- n === 1, but another scene like n > arr.length , like arr.length == 1, and its necessary to use another tool like is_number? n = isNumber(n) ? +n :1; => n = typeof n == 'number' ? +n : 1;

add if (n >= len || len == 1){ return arr }

Gyuyang avatar May 24 '23 08:05 Gyuyang