Phot_o_matic Programming

고정 헤더 영역

글 제목

메뉴 레이어

Phot_o_matic Programming

메뉴 리스트

  • 홈
  • 태그
  • 방명록
  • 분류 전체보기
    • Programming
      • TIL
      • Concept
      • Algorithm
      • Hello, stranger
      • Mindchain
      • Python
      • Vue
      • React
      • Git
      • GraphQL
      • Database
      • Twittler
      • Typescript
    • Photography
      • Olympus
      • Canon
    • IT
    • Daily
      • Yummy

검색 레이어

Phot_o_matic Programming

검색 영역

컨텐츠 검색

inheritance

  • Inheritance Pattern - Javascript

    2019.06.04 by 쌩우

Inheritance Pattern - Javascript

Object.create()를 이용한 pseudoclassical inheritance function Shape() { this.x = 0; this.y = 0; } //superclass method Shape.prototype.move = function () { this.x += x; this.y += y; console.log('this shape is moved!'); } function Rectangle() { Shpae.call(this); } Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; Rectangle.prototype.move = function () {..

Programming/Concept 2019. 6. 4. 14:38

추가 정보

인기글

최신글

페이징

이전
1
다음
Phot_o_matic Programming © phot_o_matic
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바