생성자 상속과 생성자 훔치기
JS : prototype constructor inheritance & constructor stealing이 포스팅에서는 예제를 통하여 생성자를 상속하고 생성자를 훔치는 코드에 대해 살펴보도록 합니다. prototype constructor inheritance다음의 예제 코드를 살펴보도록 합니다. javascript function Rectangle(length, width) { this.length = length; this.width = width; } Rectangle.prototype = { getArea : function () { return this.length * this.width; }, toString: function () { return "[Rectangle : " + this..