mystery

    class field 1

    class - class 기본 문법

    1. class Class를 사용하면 객체 지향 프로그래밍에서 사용되는 다양한 기능을 자바스크립트에서도 사용 할 수 있습니다. class User { constructor({name}){ this.name = name; } welcome(){ console.log(`Welcome ${this.name}`) } } let user1 = new User({name : 'Bob'}); user1.welcome(); // 'Welcome Bob' 클래스를 new 와 함께 호출하면 다음과 같은 일이 일어납니다. 1. 새로운 객체가 생성됩니다. 2. 넘겨받은 인수와 함께 constructor가 자동 실행됩니다. constructor() 는 new에 의해 자동 호출되므로, 별다른 동작없이 객체를 초기화 할 수 있습니..

    Frontend/JS.info 정리 2022.06.20
    이전
    1
    다음
    더보기
    프로필사진

    공부는 평생 하는 거라 했습니다.

    • make it happen (124)
      • 프로젝트 (5)
      • Frontend (80)
        • React (16)
        • TanStack Query (2)
        • Redux (5)
        • TS (7)
        • JS (6)
        • JS.info 정리 (44)
      • CS (1)
      • Network (1)
      • Infra (1)
      • Data Structure (2)
      • Algorithm (2)
      • Testing (2)
      • 알아두면 좋은 꿀팁들 (3)
      • 목표와 회고 (17)
      • 나를 죽이지 못한 삽질들 (5)
      • 개발 환경 (3)
      • Git (2)

    최근댓글

    Calendar

    «   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 :

    Copyright © Kakao Corp. All rights reserved.

    • github

    티스토리툴바