(index)
| 36 | return this.data[index]; |
| 37 | } |
| 38 | delete(index) { |
| 39 | const ans = this.data[index]; |
| 40 | this._collapseTo(index); |
| 41 | return ans; |
| 42 | } |
| 43 | _collapseTo(index) { |
| 44 | for (let i = index; i < this.length; i++) { |
| 45 | this.data[i] = this.data[i + 1]; |
no test coverage detected