a javascript object code example
Example 1: objects javascript
function Dog() {
this.name = "Bailey";
this.colour = "Golden";
this.breed = "Golden Retriever";
this.age = 8;
}
Example 2: js create object with properties
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}