This script is a useful set of objects to solve a common problem -
parsing the command-line passed to console scripts. However, it is also a working
Although it is not intended to explain object inheritance here, as a non-trivial working implementation of it, this script may prove a useful guide.
You can demonstrate the script online here by entering, say, ? to get help, and then following the help given to work out a valid command-line. To download the script, <Right-Click> CmdLine.js and choose Save As.
|v1.1 - Safer Array for() loops if the Array.prototype is altered.