Комментарии:
Recursive solution =
function printLinkedList(head) {
if(!head) return;
console.log(head.data);
printLinkedList(head.next);
}
HI, the solution is not working. Current Question is given in this form.
function printLinkedList(head) {
const re = new SinglyLinkedListNode(head);
console.log(re);
}