javascript
3. 주석 및 데이터 형
으누아빠
2020. 6. 23. 11:30
반응형
주석
- 코드의 이해를 돕기위해 설명하거나, 코드를 비활성화 시킬때 사용.
// 한줄 주석
/*
여러줄 주석 1
여러줄 주석 2
여러줄 주석 3
*/
데이터형(Data types)
//String
const type = "문자열";
console.log(type);
//Boolean :True or false
const type = true;
//Number
const type = 6666;
//Float
const type = 55.1;
//null 변수가 선언되고 해당 변수에 null이라는 빈값이 할당됨
//undefined 변수가 선언되어 있으나 값이 할당되어 있지 않음
const type;
console.log(type);
# 결과값: undefined