티스토리 뷰
scope(범위) | value(값) | |
ver | globally-scoped variables | 변경 가능 |
let | block-scoped local variables | 변경 가능 |
cost | block-scoped local variables | 변경 불가 |
var x = 1;
if (x === 1) {
var x = 2;
console.log(x);
// Expected output: 2
}
console.log(x);
// Expected output: 2
let x = 1;
if (x === 1) {
let x = 2;
console.log(x);
// Expected output: 2
}
console.log(x);
// Expected output: 1
const number = 42;
try {
number = 99;
} catch (err) {
console.log(err);
// Expected output: TypeError: invalid assignment to const `number'
// (Note: the exact output may be browser-dependent)
}
console.log(number);
// Expected output: 42
728x90
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- REST API
- React
- java-개발 환경 설정하기
- 표현 언어(expression language)
- java 키워드 정리
- error-java
- 스프링 프레임워크(spring framework)
- 람다식(lambda expression)
- 문자 자르기
- 인텔리제이(intellij)
- jstl(java standard tag library)-core
- 스프링 시큐리티(spring security)-http basic 인증
- await
- java web-mvc
- 스프링 프레임워크(spring framewordk)
- In App Purchase
- System.Diagnostics
- 메이븐(maven)
- 특정 문자를 기준으로 자르기
- java.sql
- docker
- 진수 변환
- nl2br
- system.io
- MainActor
- jsp 오픈 소스
- 제품 등록
- 스프링 시큐리티(spring security)
- jstl(java standard tag library)
- .submit()
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함