function SuperType() { this.colors = ["red", "blue", "green"]; } function SubType() { // SuperType에서 상속 SuperType.call(this); // apply() 사용해도 됨 } var instance1 = new SubType(); var instance2 = new SubType(); instance1.colors.push("black"); document.write(instance1.colors + "<br>"); // red,blue,green,black document.write(instance2.colors + "<br>"); // red,blue,green // 소유자 체크 document.write(instance1.hasOwnProperty("colors")); // true