0
How do I declare constant variables?
4 Réponses
+ 3
just add "final" keyword before the var declaration. After first value is assinged to that variable you cant change its constant throughout its scope
eg:
final int x=10;
+ 1
You put final in front of it.
0
using let before execution
0
Just using "let" instead of "var" you declare a constant than you can't change later