primitive type = 원시적인 타입. 숫자, 정수, 소숫점, 참과 거짓, null, underfined, NaN
null, underfined, NaN의 차이를 알아보자.
String의 규칙: 같은 따옴표로 시작, 끝을 맺어야 함. 아님 에러남
듣다보니 다 아는거임 블로그 안써도 될덧
아! null, underfined, NaN을 알아보자
underfined: '정의가 되지 않음'
Null: '존재하지 않음으로 정의가 됨'
let hello;
#underfined
hello
#underfined
console.log(hello === underfined)
#true, but underfined
console.log(hello === null)
#false and underfined
NaN: 'Not a. number', 수학 공식에서 나오는 망한 결과값. 해당 공식이 이상하다는 것을 알 수 있다.
뭐냥 1학년때 배우는 것이구망 오키 끝!
'javascript' 카테고리의 다른 글
[javascript] #6. scope (큰 버블 작은 버블 들락날락) (0) | 2023.02.15 |
---|---|
[javascript] #5. typeof (boolean, string, number...) (0) | 2023.02.15 |
[javascript] #4. Type coercion(자료구조 확인) (0) | 2023.02.14 |
[javascript] #3. Value Types (0) | 2023.02.13 |
[javascript] #1. 콜스택(call stack) (0) | 2023.02.10 |