Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 229 Bytes

traverseSolution.md

File metadata and controls

17 lines (14 loc) · 229 Bytes

Traverse Linked List solution

Javascript

function traverse(node) {
    let head = node || null
    if(!head) {
        return
    }
    else {
        console.log(node.val)
        prettyPrint(node.next)
    }
}