RUBY variable syntax | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

RUBY variable syntax

Is it possible to start a variable with underscore? How about numbers?

25th Feb 2017, 9:37 AM
Moses
1 Answer
+ 18
Yes, it is possible to create variables with starting with underscores, but it is not possible to create them starting with numbers or hyphens ( - ).
25th Feb 2017, 10:08 AM
Gami
Gami - avatar