var x = 1;
let y = 1;
if(x === 1) {
var x = 2;
let y = 2;
console.log(x);
console.log(y);
}
console.log(x);
console.log(y);'javascript' 카테고리의 다른 글
| 객체지향 프로그래밍 (0) | 2022.06.23 |
|---|---|
| 화살표 함수 (0) | 2022.06.23 |
| location (0) | 2022.06.22 |
| navigator (0) | 2022.06.22 |
| 키보드 관련 이벤트 (0) | 2022.06.22 |