<html> <head> <script language="javascript"> function Animal(name){ this.name = name; this.showName = function(){ alert(this.name); } } function Cat(name){ Animal.call(this, name); } Cat.prototype = new Animal(); var cat = new Cat("Black Cat"); cat.showName(); alert(cat instanceof Animal); </script> </head> <body></body> </html>