Print the Elements of a Linked List

  • + 0 comments

    Why my code is not working? Javascript mode. In google debbuger is printing each element.

    function print (head){ if(head.length == null){ return null } else { for(let i = 0; i < head.length; i++){ console.log(head[i]) } } }