Friends! Please explain me the differences . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Friends! Please explain me the differences .

A_VARIABLE_NAME , a-variable-name , a variable name

5th Sep 2018, 11:08 AM
Rubel
4 Answers
+ 3
a-variable-name will give an error because '-' is an operator and operators cannot be part of variable names. The last one gives an error because of the space, variables names cannot consist of spaces
5th Sep 2018, 11:29 AM
David Akhihiero
David Akhihiero - avatar
+ 4
only A_VARIABLE_NAME works well as a variable name 😁, the others will give syntax error
5th Sep 2018, 11:16 AM
David Akhihiero
David Akhihiero - avatar
+ 2
Thank u so much
5th Sep 2018, 1:57 PM
Rubel
+ 1
Thz Fri But I wonder why the other two give error. Plz🤗
5th Sep 2018, 11:23 AM
Rubel