본문 바로가기 메뉴 바로가기

UX&UI Engineer

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

UX&UI Engineer

검색하기 폼
  • 분류 전체보기 (6)
    • Daily life (0)
    • English (0)
    • UI & UX Design (0)
    • Front-end (3)
      • HTML (0)
      • CSS (0)
      • Bootstrap (0)
      • Javascript (3)
      • jQuery (0)
      • ECMASCRIPT 6 (0)
      • Angular (0)
      • React (0)
      • Ioinic (0)
    • Back-end (3)
      • Node.js (3)
      • Express (0)
      • Python (0)
    • IOS (0)
    • Database (0)
      • MySQL (0)
      • MongoDB (0)
      • Firebase (0)
    • CLI (0)
  • 방명록

Inheritance (1)
javascript prototype inheritance

Javascript prototype inheritance 자바스크립트에서 상속(inheritance)은 prototype을 이용하여 코드를 재사용할 수 있다. new 연산자를 이용한 classical한 방식과 Object.create()를 이용한 prototypal한 방식이 있다. // baseClass function Person() { this.sayJob = false; } // prototype method Person.prototype.say = function () { console.log(this.sayJob ? "Yes" : "No"); }; // subClass function Programmer() { Person.call(this); } Programmer.prototype = Ob..

Front-end/Javascript 2017. 2. 26. 02:42
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
글 보관함
TAG
  • Inheritance
  • javascript
  • prototype
  • Node.js
  • function
  • closure
  • Object
  • EventEmitter
  • Factory
  • constructor
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Total
Today
Yesterday

Blog is powered by Tistory / Designed by Tistory

티스토리툴바