//Declare function for object
function person(name, age, color) {
    this.name = name;
    this.age = age;
    this.favColor = color;
}

// declare new array
var courses = new Array();
courses[0] = new person("John", 42, "green");
courses[1] = new person("John", 62, "greennnnnnnnn");

// call array into DOM $(document).ready(function(){     $("#newphrasalverbofgo").append('<div id="gowith" class="alert alert-info" role="alert" ></div>');     for(i=0;i<courses.length;i++) {     $("#gowith").append('<h6>'+ courses[i].age + '</h6>');     $("#gowith").append('<h6>'+ courses[i].favColor + '</h6>');     } });
Result:
airplanemode_active