Variables and constants may at first look similar in a sense that both are identifiers made up of one character or more characters (letters, numbers and a few allowable symbols). Both will also hold a particular value. Values held by a variable can be altered throughout the program, and can be used in most operations and computations. Constants are given values at one time only, placed at the beginning of a program. This value is not altered in the program. For example, you can assigned a constant named PI and give it a value 3.1415 . You can then use it as PI in the program, instead of having to write 3.1415 each time you need it.
Related posts
-
BESTFY Pagamentos (Payment) Gateway Integration in PHP
BESTFY Pagamentos (Payment) is a Brazilian payment gateway that allows merchants to accept payments using a... -
Artificial Intelligence (AI) Multiple Choice Questions
Are you ready to test your knowledge of artificial intelligence (AI)? This set of 50 multiple-choice... -
Agile vs Waterfall: Know the Difference Between Methodologies
The main difference between Agile vs Waterfall is that Agile methodology is a continuous and iterative...