(stack, n)
| 169 | } |
| 170 | |
| 171 | function pop(stack, n) { |
| 172 | const arr = []; |
| 173 | for (let i = 0; i < n; i++) { |
| 174 | arr.push(stack.pop()); |
| 175 | } |
| 176 | return arr; |
| 177 | } |
| 178 | |
| 179 | function push(stack, initialValue, length) { |
| 180 | if (Array.isArray(initialValue)) { |
no test coverage detected