function Cat(name,color){ this.name = name; this.color = color; this.eat = function() { console.log('eat fish'); }; } var cat1 = new Cat('Kitty', 'black'); alert(cat1.name); // Kitty alert(cat1 instanceof Cat); // TRUE //javascript/6959