상수 (Constant)
상수(Constant)는 프로그래머가 변경할 수 없는 값입니다. 예를 들어, 숫자(1, 2, 42)입니다. 반면에 변수를 사용하면, 프로그래머는 이미 사용중인 변수 이름에 새로운 값를 할당할 수 있습니다.
변수와 마찬가지로, 일부 상수는 식별자에 바인딩됩니다. 예를 들어, pi
식별자는 값 3.14… 에 바인딩 될 수 있습니다.
같이 보기
- 위키백과의 상수
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2024 by individual mozilla.org contributors. Content available under a Creative Commons license.