var photo = document.getElementById("photo"); photo.id = "newId"; document.getElementById("someOtherDiv").appendChild(photo);
let parent = document.body; let childToAppend = document.createElement('a'); parent.appendChild(childToAppend)