[ Java Script ] 데이터 특징

ma.caron_g·2022년 10월 10일
0

Java Script

목록 보기
2/11
post-thumbnail

참고 강의

[타입]

데이터의 분류 기준
ex. 소주는 소주잔에, 맥주는 맥주잔에

[ 기본형 VS Object형 ]

[ primitive ]

  • number : 숫자
  • String : 문자
  • boolean : 참/거짓
  • undefined 정의되지 않음.
  • null : 값이 없음.
let string = "나는 문자";
let number = "나는 숫자";
let boolean = false;
let undef;
let noValue = null;

console.log(typeof string + " : " + string);
console.log(typeof number + " : " + number);
console.log(typeof boolean + " : " + boolean);
console.log(typeof undef + " : " + undef);
console.log(typeof noValue + " : " + noValue);

type of를 통해 변수의 타입을 확인할 수 있습니다.

[ Object ]

오브젝트는 일반 데이터 타입이 아닌
배열이나 리스트, 딕셔너리와 같은 형태를 의미합니다.

profile
다른 사람이 만든 것을 소비하는 활동보다, 내가 생산적인 활동을 하는 시간이 더 많도록 생활화 하자.

0개의 댓글