Untitled Document
Assignment 6
var favorite_animal = favorite_animal || (function() {
var color = "Black";
var height = "Four Feet";
var weight = "10 pounds";
var breed = "Pug";
var affection_level = "High";
return {
getDescription: function() {
console.log("These are the attrributes of my favorite animal.");
},
getColor: function() {
return color;
},
getHeight: function() {
return height;
},
getWeight: function() {
return weight;
},
getBreed: function() {
return breed;
},
getAffection_Level: function() {
return affection_level;
},
}}());
function WhoLetTheDogsOut(){
console.log(favorite_animal.getDescription());
console.log(favorite_animal.getColor());
console.log(favorite_animal.getHeight());
console.log(favorite_animal.getWeight());
console.log(favorite_animal.getBreed());
console.log(favorite_animal.getAffection_Level());
}
WhoLetTheDogsOut();
//BARK BARK BARK
WhoLetTheDogsOut();
//BARK BARK BARK
WhoLetTheDogsOut();
//BARK BARK BARK