/* A constructor in Javascript is used to create a new object and set values
for any existing object properties*/
class Animal{
constructor (name, height, weight){
console.log("created animal named", name)
}
nameLength() {
return name.length;
}
}
var dog = new Animal("Fido", 25, 90);
var fish = new Animal("Goldie", 2, .02);
console.log(dog.nameLength);