function Shape() {
this.x = 0;
this.y = 0;
}
Shape.prototype.move = function(x, y) {
this.x += x;
this.y += y;
console.log("This is moving action...");
}
function Rectangle() {
Shape.call(this, arguments);
Rectangle.prototype = Object.create(Shape.prototype);
}
var rect = new Rectangle();
alert(rect instanceof Rectangle); //fasle? 某些教程上说是true
alert(rect instanceof Shape); //false? 某些教程上说是true
rect.move(2, 3); //没定义?
Rectangle.prototype = Object.create(Shape.prototype); 移到构造函数以外