javascript のプロトタイプについて非常に混乱しています。
私はこのコードを持っています:
function Animal(name){
this.name=name;}
function Dog(nameA){
this.legs=4;}
Dog.prototype=new Animal();
var dog=new Dog();
alert(Object.getPrototypeOf(dog));
alert '[object Object]'
alert(dog._proto_);
//alert 'undefined'
'Animal' を 2 回警告するべきではありませんか?