클래스

    [mdn, 드림코딩 외] 객체(Object)와 프로퍼티(property) (2) : 생성/수정과 cloning

    https://sunshineyellow.tistory.com/17?category=1037372 [코딩앙마 외] 객체(Object)와 프로퍼티(property) 객체(Object) key와 value로 이루어질 수 있다. 1. 함수표현식 const goodCoder = function(name, age, coding) { name : 'Noran', age : 20, coding : function(){ console.log('화이팅!'); } } name : 'Noran',.. sunshineyellow.tistory.com https://sunshineyellow.tistory.com/18?category=1037372 [코딩앙마 외] 객체 리터럴과 객체 접근법, 그리고 생성자 함수 객체를 생성하는..

    [mdn, 드림코딩 외] 객체지향 (1) : 클래스(class)

    들어가기 앞서 : 생성자함수와 클래스의 차이점 https://sunshineyellow.tistory.com/18?category=1037372 [코딩앙마 외] 객체 리터럴과 객체 접근법, 그리고 생성자 함수 객체를 생성하는 방법에는 두 가지가 있다. 객체 리터럴 생성자 함수 단 하나의 객체만을 생성할 때는 직관적이고 간편한 객체 리터럴을 사용하고, 같은 객체를 대량생산할 때는 생성자함수를 sunshineyellow.tistory.com 위 글에서 객체와 생성자함수를 간단하게 공부했다. 그렇다면 생성자함수와 다른 클래스의 특이점은 무엇일까? 클래스는 new 연산자 없이는 호출이 불가능하다. 클래스는 extends(클래스의 상속)와 super(super클래스의 constructor과 method 호출)를 ..