function cat(n){ this.name=n; function catname(){ log(this.name,"\n"); } this.print=catname; } var c1=new cat("Kuro"); var c2=new cat("Shiro"); c1.print(); c2.print();