Objects are connected within functions with "."'s. Objects are named by the programmer, and are attached to variables/keywords/strings that are previously named to contruct the function. They are enclosed with curly braces "{...}"'s.
Example:
function myFn(JSobject) {
document.getElementById(JSobject.id).src = "images/" + JSobject.img[randomNum];}