Visitar URL original
상수 (Constant) - MDN Web Docs 용어 사전: 웹 용어 정의 | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

상수 (Constant)

상수(Constant)는 프로그래머가 변경할 수 없는 값입니다. 예를 들어, 숫자(1, 2, 42)입니다. 반면에 변수를 사용하면, 프로그래머는 이미 사용중인 변수 이름에 새로운 값를 할당할 수 있습니다.

변수와 마찬가지로, 일부 상수는 식별자에 바인딩됩니다. 예를 들어, pi 식별자는 값 3.14… 에 바인딩 될 수 있습니다.

같이 보기