* @return {*}
()
| 42 | * @return {*} |
| 43 | */ |
| 44 | pop() { |
| 45 | // Let's try to delete the first node (the head) from the linked list. |
| 46 | // If there is no head (the linked list is empty) just return null. |
| 47 | const removedHead = this.linkedList.deleteHead(); |
| 48 | return removedHead ? removedHead.value : null; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @return {*[]} |
no test coverage detected