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