Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

valid identifiers

 
anandkrisnan variar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which are valid identifiers?
1) _variables
2) �currency
3) val$ue
4) @purr
5) 2digits
Also can u tell what is the '�' in the '�currency'
 
Kasi lingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1,2,3 are valid identifiers.
4,5 are not valid identifiers.It starts with number and invalid character.
� is the currency for Japan 'YEN'.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
� is the currency for Japan 'YEN'.
Exactly right. Identifiers can start with a letter, underscore or a currency symbol, and they can include digits in any location EXCEPT the first one.
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!