Back to Freecodecamp

Task 43

curriculum/challenges/english/blocks/learn-how-to-use-code-related-concepts-and-terms/66339e21256f099cd722292f.md

latest1.0 KB
Original Source

--description--

A constant in programming is similar to a variable, but once it is assigned a value, that value cannot be changed. Constants are used when you have values that you know will not need to be modified throughout the program. They are often written in uppercase letters to distinguish them from variables.

For example, const PI = 3.14; In many programming languages, const is used to declare a constant. Here, PI is a constant with assigned value 3.14.

--questions--

--text--

What is a constant in programming?

--answers--

A value that changes over time

--feedback--

A constant is a value that does not change once it's set, unlike a variable.


A type of programming language

--feedback--

A constant is a concept within programming languages, not a language itself.


A value that does not change once set


A part of the computer hardware

--feedback--

A constant is a coding concept, not a physical component of computers.

--video-solution--

3