+ 1
Variable names cannot start with capital letters?
The lesson says that variable names cannot start with capital letters, I thought that was weird so I tried it and it works? What exactly is supposed to be the error? Or is it just convention?
4 Answers
+ 1
Well, they're constants, of course. Kind of got ahead of the course a bit I guess.
+ 1
Its just a good programming practice that you should not name your variable with capital letters. You can but you should not.
+ 1
It's a convention. Generally, you should follow whatever convention is expected from one's employer or educational institution. The convention exists for the purpose of other programmers to more readily understand the code you've made. On your own, you can use whatever convention is convenient for you.
0
you can but - you should not really as it is unconventional
```
irb(main):002:0* Var = 5
=> 5
irb(main):003:0> Var.class
=> Fixnum
irb(main):004:0>
```