(stack)
| 40 | } |
| 41 | |
| 42 | peek(stack) { |
| 43 | let length = this._getLength(stack), |
| 44 | value; |
| 45 | if (length > 0) { |
| 46 | let idx = (length - 1) * 3 + stack - 1; |
| 47 | value = this._array[idx]; |
| 48 | } |
| 49 | return value; |
| 50 | } |
| 51 | |
| 52 | isEmpty(stack) { |
| 53 | return this._getLength(stack) === 0; |
nothing calls this directly
no test coverage detected