Can I assign value to constant variable after declaration? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can I assign value to constant variable after declaration?

24th Aug 2016, 4:52 PM
Aung Thuya
Aung Thuya - avatar
8 Answers
+ 4
No, you can't...
10th Nov 2016, 11:15 PM
vivo tito
vivo tito - avatar
0
No you cannot
24th Aug 2016, 10:43 PM
Maximilian
0
Constant variable cannot be changed when declared
11th Sep 2016, 7:37 PM
gdeotech
gdeotech - avatar
0
No, you have to assign it a value at the same time you declare it
3rd Nov 2016, 3:50 AM
Briknie Báez Rodríguez
Briknie Báez Rodríguez - avatar
0
a variable and constant are two different things, a constant cannot be changed after declaration but a variable can
21st Nov 2016, 7:38 PM
John Call
John Call - avatar
0
The concept of a constant is that it is a value that never changes, like the value of pi. If you have a variable that needs to change during the course of running a program declare it as a var.
24th Nov 2016, 4:35 PM
David-Hesh Hochhauser
David-Hesh Hochhauser - avatar
- 2
vivo Tito....nice...can I get any of your social media id...wanna contact you
17th Nov 2016, 10:28 AM
ishaq Nasir
ishaq Nasir - avatar
- 2
Perhaps your Whatsapp contact
17th Nov 2016, 10:34 AM
ishaq Nasir
ishaq Nasir - avatar