- They can contain unicode letters (or escape sequences),
_, or digits (
- They cannot start with a digit.
For example, the following are all valid identifies for variables, functions and object properties:
foo foo123 _foo_ $foo
As mentioned earlier, unicode characters or escape sequences are also valid identifiers. You can use these for variable, function or property names. For example, the following are all valid identifies for variables, functions and object properties:
This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.