* @description - Return the item at the tail of the queue * @returns {*}
()
| 79 | * @returns {*} |
| 80 | */ |
| 81 | peekLast() { |
| 82 | if (this.isEmpty()) { |
| 83 | throw new Error('Queue is Empty') |
| 84 | } |
| 85 | |
| 86 | return this.tail.data |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * @description - Return the array of Queue |