1 | The String object has one property: |
2 | myString.length gives string length in characters |
3 | JavaScript has only one type of String object, whereas Java has both String (fixed) and StringBuffer (mutable) classes |
4 | Characters are indexed from the left starting at 0 and ending with myString.length - 1 |
5 | newstring = myString.substring(pos1,pos2); |
6 | returns the substring in position pos1 ... pos2 - 1 |
7 | Peculiarly, if pos2 < pos1, the previous statement returns the substring in position pos2 ... pos1 - 1 |