mystery

    Shallow Copy 1

    객체: 기본 - 참조에 의한 객체 복사

    객체와 원시타입의 가장 큰 차이점은 원시 타입이 '값 그대로' 저장되고 복사되는 반면에 객체는 '참조에 의해' 저장되고 복사된다는 것입니다. 참조에 의한 값 복사 ( 객체 ) 문자열을 할당한 변수를 복사한 결과입니다. let msg = "hi" let phrase = msg phrase = "hello" console.log(msg)// hi console.log(phrase)// hello 각자 다른 문자열이 출력 되었습니다. 객체를 할당한 변수를 복사한 결과입니다. let msg = { msg : 'hi'} let phrase = msg phrase.msg = 'hello' console.log(msg)// {msg: 'hello'} console.log(phrase)// {msg: 'hello'} ..

    Frontend/JS.info 정리 2021.12.13
    이전
    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/06   »
    일 월 화 수 목 금 토
    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

    방문자수Total

    • Today :
    • Yesterday :

    Copyright © Kakao Corp. All rights reserved.

    • github

    티스토리툴바