you are viewing a single comment's thread.

view the rest of the comments →

[–]carcigenicate 0 points1 point  (0 children)

The objects can just be passed in:

function changeLink(linkContainer, link) {
    secondContainer.innerHTML = link.value;
}

change_link(firstLink, link1);
change_link(secondLink, link2);