Declaring Constants and Variables: Naming Constants and Variables
Additional information
- Can contain almost any character, including Unicode characters.
- Can’t contain whitespace characters, mathematical symbols, arrows, private-use Unicode scalar values, or line- and box-drawing characters.
- They can't begin with a number, although numbers may be included elsewhere within the name.
- Avoid using keywords as names unless you have absolutely no choice.
- Let languageName = "Swift" languageName = "Swift++" // This is a compile-time error: languageName cannot be changed.
Semantic portal