A constant is a value that the programmer cannot change, for example numbers (1, 2, 42). With variables, on the other hand, the programmer can assign a new value to a variable name already in use.

Like variables, some constants are bound to identifiers. For example, the identifier pi could be bound to the value 3.14... .

Learn more

General knowledge

Document Tags and Contributors

 Contributors to this page: PetiPandaRou, klez, Andrew_Pfeiffer, Jeremie, Pragna_Vedanthi
 Last updated by: PetiPandaRou,