
1. 변수와 상수 JavaScript에서 데이터를 저장할 때는 변수와 상수를 사용해. 변수는 let으로 선언하고, 상수는 const로 선언해. 변수 예시: let name = "John"; console.log(name); // John name = "Jane"; console.log(name); // Jane 상수 예시: const pi = 3.14; console.log(pi); // 3.14 // pi = 3.1415; // 이렇게 하면 에러가 날 거야, 상수의 값을 바꿀 수 없으니까! 2. 데이터 타입 JavaScript에는 여러 가지 데이터 타입이 있어. 문자열, 숫자, 불리언, 객체, 배열, null, undefined 등이 그 예시야. 데이터 타입 예시: let string = "Hello,..
Javascript
2023. 10. 6. 10:00