Notice
Recent Posts
Recent Comments
Link
목록생성자 (1)
Romantic Developer : )
안녕하십니까 영감을 주는 개발자 방민방민입니다. 이전의 자바스크립트 기초문법을 통해 객체를 생성하는 방법에 대해서는 선행학습을 하였습니다.이번시간에는 그러한 객체를 생성자를 통해 자유롭게 생성하는 방법에 대해 알아보고자 합니다. 먼저 아래의 코드를 살펴보겠습니다. var o1= { name : 'Bangmin', introduce : function(){ return 'My name is ' + this.name; } } var o2={ name : 'Minseok', introduce : function(){ return 'My name is ' + this.name; } } alert(o1.introduce()); alert(o2.introduce()); o1이라는 객체와 o2 라는 객체는 name ..
Romantic Developer/JavaScript
2018. 7. 19. 16:00