[자바 스크립트] 3. 변수 타입

백하림's avatar
Mar 31, 2025
[자바 스크립트] 3. 변수 타입
// 변수 -> 타입추론 (들어갈 때 정해짐) // 가장 최상단에 적을 수 있는 것들을 1급 객체라고 한다. (자바에서 1급 객체는 클래스 밖에 없다.) let n1 = 1; // Number 타입 let n2 = 10.5; // Double 타입 let s1 = "문자열"; // 쌍 따옴표 String 타입 let s2 = '문자열'; // 홑 따옴표 let s3 = `문자열${n1}`; // 백틱 let b1 = true; // bool 타입 let u1 = null; // null 타입 let u2; // undefined 타입 console.log(n1); console.log(n2); console.log(s1); console.log(s2); console.log(s3); console.log(b1); console.log(u1); console.log(u2);
notion image
Share article

harimmon