Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
As the name implies, constants are non volatile data, unlike variables, that changes its value or type, constants are used for storing things that are unlikely to change. There are many ways we use constants, amongst the most common use are: - As options for configuration of data connection. - As argument to pass to functions - For arithmetic calculation e.g. Phi. You can use constant for anything that you're sure don't need to change, in the case you need to modify the content of a constant, you only modify the definition, then the change will reflect anywhere the constant is used. Hth, cmiiw
30th Sep 2017, 1:35 PM
Ipang