📗
TIL
  • About
  • javascript
    • GoodParts
      • 프로토타입 방식
      • RegexComponent
      • 재귀적 호출 (Recursive Call)
      • 객체를 기술하는 객체
      • 예외 (Exception)
      • 호출
      • 문자열 (Strings)
      • 참조 (Reference)
      • 배열의 특성들
      • 숫자 (Numbers)
      • 메모이제이션 (Memoization)
      • 모듈 (Module)
      • 열거 (Enumeration)
      • 정규 표현식
      • 정규 표현식 객체 생성
      • 프로토타입 (Prototype)
      • 콜백 (Callback)
      • 문장 (Statements)
      • 함수 표현식 요약
      • 의사 클래스 방식 (Pseudoclassical)
      • 함수를 사용한 방식
      • 클로저 (Closer)
      • 배열 (Array)
      • 기본 타입에 기능 추가
      • 자바스크립트 분석
      • 인수 배열(arguments)
      • Function
      • 유효범위(Scope)
    • YouDon'tKnowJS
      • 타입
      • Native
      • 명시적 강제변환
      • 문자열
      • 함수 vs 블록 스코프
      • 클로저
      • 배열
      • 숫자
      • 연산자 우선순위
      • 스코프
      • 암시적 강제변환
      • 래퍼
      • Statement
      • 호이스팅
      • Coercion
    • javascript
Powered by GitBook
On this page

Was this helpful?

  1. javascript
  2. GoodParts

프로토타입 (Prototype)

  • 모든 객체는 속성을 상속하는 프로토타입 객체에 연결

  • 객체 리터럴로 생성되는 모든 객체는 자바스크립트의 표준 객체인 Object의 속성인 prototype 객체에 연결

if (typeof Object.create !== 'function') {
  Object.create = function (o) {
    var F = function() {};
    F.prototype = o;
    return new F();
  };
}
var another_stooge = Object.create(stooge);
Previous정규 표현식 객체 생성Next콜백 (Callback)

Last updated 4 years ago

Was this helpful?