JS 기본 데이터 타입중 참조자료형과 원시자료형의 차이 (+heap, call stack 개념겉핥기) : 왜 필요한가?_ 메모리- 데이터 크기의 제한
원시자료형 중 null의 예외, null과 undefined의 차이,
typeof null // 'object'
(+bigInt, symbol-"new")
Scope:
1)썬팅창문(tinting)같은 유효범위!
2)중첩규칙
3)지역변수>전역변수
4)let,const,var -유효범위,재할당,재선언 차이
5)전역 객체(window)▵
Closure
1)정의: 외부함수의 변수에 접근가능한 내부함수, 함수와 함수
2)클로저의 활용: 데이터를 보존하는 함수(어휘적 환경저장), 정보의 접근제한(캡슐화)-side effect예방, 모듈화에 유리함
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. -MDN closure