Const name | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Const name

Why the const is called var instead a most meaninful name?

27th Apr 2017, 4:34 PM
Eloy Hernández
Eloy Hernández - avatar
3 Answers
+ 1
hi Eloy, 'var' is only an example. you can choose any name you like: const int number_of_legs_for_a_dog = 4;
27th Apr 2017, 4:39 PM
needmorechocolate
needmorechocolate - avatar
0
you can name it any the value of constant is fixed not the const name
27th Apr 2017, 5:44 PM
Omar
Omar - avatar
0
it's confusing if you use "var" because is not variable
27th Apr 2017, 11:27 PM
Oscar Patiño
Oscar Patiño - avatar