Strings as we've seen are lists of characters enclosed in quotes (single (') or double quotes (").)
Each character in the string can be accessed individually by specifying
the integer index inside of []'s that are appended to the variable
name or string constant. i.e:
str[i]
or:
"abc"[i]
The first character in a string is at index 0, the second at index 1, etc.
If the index is negative or beyond the length of the string the result is
"undefined", i.e.:
The length property gives the number of characters in the string:
Properties can be accessed on string constants:
Methods are functions that operate on the variable or constant:
Makes an array: ["one", "two", "three"] where the string is "split" into words separated by the string passed to the split method.
.substr() method - extracts a sub-string: