Object.create

    [33-js-concepts] 18. Object.create and Object.assign

    Object.create의 배경 - 자바스크립트의 상속 - 자바스크립트만으로 웹페이지의 동작을 구현하기 시작하면서 객체지향의 개념이 집중되게 되었다. - new를 이용한 상속 (prototype) function Person() { this.name = "anonymous"; this.job = "none"; this.sayHello = function () { alert("Hello, my name is " + this.name); }; } function Unikys() { this.name = "Unikys"; this.job = "Programmer"; } Unikys.prototype = new Person(); var unikys = new Unikys(); unikys.sayHello(); ..