A string literal can be wrapped in single quotes or double quotes. It can contain
zero or more characters. The
\ (backslash) is the
The escape sequences allow for inserting characters into strings that are not
normally permitted, such as backslashes, quotes, and control characters. The
\u convention allows for specifying character
code points numerically.
"A" === "\u0041"
Strings have a
length property. For example,
"seven".length is 5.
Strings are immutable. Once it is made, a string can never be changed. But it is
easy to make a new string by concatenating other strings together with the
+ operator. Two strings containing exactly the same
characters in the same order are considered to be the same string. So:
'c' + 'a' + 't' === 'cat'
Strings have methods (see Chapter 8):
'cat'.toUpperCase( ) === 'CAT'