function findMergeNode(headA, headB) {
    let nodeA = headA;
    let nodeB = headB;

    while (nodeA !== nodeB) {
        if (nodeA.next == null) {
            nodeA = headB;
        } else {
            nodeA = nodeA.next;
        };

        if (nodeB.next == null) {
            nodeB = headA;
        } else {
            nodeB = nodeB.next;
        };
    };
    return nodeB.data;
}
/*Pseudocode:
1. Declare a variable called nodeA and set it equal to input headA so it'll serve as a pointer for headA and 1st linked list
2. Decalre a variable called nodeB and set it equal to input headB so it'll serve as a pointer to headB and to 2nd linked list.
3. Make a while loop of while nodeA does not equal equal nodeB
4. Inside while loop, make an if statement of if nodeA.next equals equals null (we've reached end of linked list A) then reset nodeA pointer
to headB (start from second linked list now).
5. Else (if we haven't reached end of linked list A yet) then set nodeA to nodeA.next to move through the linked list.
6. Outside else statement, make another if statement, check if nodeB.next equals equals null (we have reached end of linked list B first) then
reset linked list B pointer nodeB to headA (to start iterating through the other linked list).
7. Else (if we haven't reached end of linked list B yet) then set nodeB to nodeB.next to iterate through linked list B. The while loop will 
stop as soon as a node from first linked list equals a node from the 2nd nodeB linked list
8. Outside while loop, return nodeB.data to return the node where the while loop broke when the node from both linked lists became equal
 */
1. Declare a variable called nodeA and set it equal to input headA so it'll serve as a pointer for headA and 1st linked list
2. Decalre a variable called nodeB and set it equal to input headB so it'll serve as a pointer to headB and to 2nd linked list.
3. Make a while loop of while nodeA does not equal equal nodeB
4. Inside while loop, make an if statement of if nodeA.next equals equals null (we've reached end of linked list A) then reset nodeA pointer
to headB (start from second linked list now).
5. Else (if we haven't reached end of linked list A yet) then set nodeA to nodeA.next to move through the linked list.
6. Outside else statement, make another if statement, check if nodeB.next equals equals null (we have reached end of linked list B first) then
reset linked list B pointer nodeB to headA (to start iterating through the other linked list).
7. Else (if we haven't reached end of linked list B yet) then set nodeB to nodeB.next to iterate through linked list B. The while loop will
stop as soon as a node from first linked list equals a node from the 2nd nodeB linked list
8. Outside while loop, return nodeB.data to return the node where the while loop broke when the node from both linked lists became equal
1 . Declare a variable called nodeA and set it equal to input headA so it ' ll serve as a pointer for headA and 1st linked list 2 . Decalre a variable called nodeB and set it equal to input headB so it ' ll serve as a pointer to headB and to 2nd linked list . 3 . Make a while loop of while nodeA does not equal equal nodeB 4 . Inside while loop make an if statement of if nodeA . next equals equals null ( we ' ve reached end of linked list A ) then reset nodeA pointer to headB ( start from second linked list now ) . 5 . Else ( if we haven ' t reached end of linked list A yet ) then set nodeA to nodeA . next to move through the linked list . 6 . Outside else statement make another if statement check if nodeB . next equals equals null ( we have reached end of linked list B first ) then reset linked list B pointer nodeB to headA ( to start iterating through the other linked list ) . 7 . Else ( if we haven ' t reached end of linked list B yet ) then set nodeB to nodeB . next to iterate through linked list B . The while loop will stop as soon as a node from first linked list equals a node from the 2nd nodeB linked list 8 . Outside while loop return nodeB . data to return the node where the while loop broke when the node from both linked lists became equal
function findMergeNode(headA, headB) {
    let nodeA = headA;
    let nodeB = headB;
    while (nodeA !== nodeB) {
        if (nodeA.next == null) {
            nodeA = headB;
        } else {
            nodeA = nodeA.next;
        };
        if (nodeB.next == null) {
            nodeB = headA;
        } else {
            nodeB = nodeB.next;
        };
    };
    return nodeB.data;
}
function findMergeNode ( headA , headB ) { let nodeA = headA ; let nodeB = headB ; while ( nodeA !== nodeB ) { if ( nodeA . next == null ) { nodeA = headB ; } else { nodeA = nodeA . next ; } ; if ( nodeB . next == null ) { nodeB = headA ; } else { nodeB = nodeB . next ; } ; } ; return nodeB . data ; }
Pseudocode:
1.
Pseudocode : 1 .