Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
javascript
advanced
variables
01var_identifier.js
01var_identifier.js
/** * Variable identifier * - can use any letter, digit, underscore (_) or dollar sign ($) * - must start with _ , $ or letter * - can't start with number */ //Good identifiers var _name = 'John'; var firstName = 'Mary'; var $name = "Dollar"; var secondName2 = 'Smith'; //Bad identifiers //var 5name = 'John'; //SyntaxError: identifier starts immediately after numeric literal
Reload page
Preview
W3C validation
Edit Code
JS Console