So the idea is to create a class Animal and the set properties to it as a new object
Here is what I have:
var name;
var type;
function Animal(name,type){
this.type = type,
this.name = name,
toString = function(){return this.name + "is a " + this.type;}
};
var cat = new Animal('Max','cat');
cat.type;
everytime I run it - I seem to fail at the toString part? Pretty new and trying to learn this - is there something I am missing?