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];}
Arrays are a variable containing a collection, such as images/names/functions. They are enclosed with brackets "[...]"'s. They are written before functions involving them so that they are remembered when called upon. These are also named by the programmer, and are linked within methods as [.]'s.
Example:
var idNames = [
"hero1",
"hero2",
"hero3",
"hero4",
"hero5",
"heroX" ]