jPaq Example - Case Insensitive Sort

Have you ever had to sort an array in JavaScript?  With the built-in sort function, the task is usually pretty easy when it comes to an array of strings.  As you probably already know, the native sort function is case sensitive by default.  How do we make it case insensitive?  This is where the String.prototype.compareTo() function comes in handy.  The following is an example of how to sort an array of strings in a case insensitive way:

Applicable Parts